Support separate inbound and outbound subnet skips#792
Draft
hooiv wants to merge 1 commit into
Draft
Conversation
Problem: skip-subnets only excludes inbound traffic, so outbound packets destined for those subnets are still redirected through the proxy. Solution: add explicit inbound and outbound subnet options while preserving skip-subnets as the backwards-compatible inbound setting. Validation: go test ./pkg/iptables ./proxy-init/cmd Signed-off-by: hooiv <125276621+hooiv@users.noreply.github>
This was referenced Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The existing
--subnets-to-ignoreoption only adds source-subnet RETURN rules to the inbound chain. Outbound traffic to the same subnets is still redirected through the proxy.Solution
Add
--inbound-subnets-to-ignoreand--outbound-subnets-to-ignore. The legacy option remains supported as an inbound-only setting. Outbound exclusions match destination addresses.This is the proxy-init implementation for linkerd/linkerd2#10726; the injector and chart wiring are submitted separately.
Validation
go test ./pkg/iptables ./proxy-init/cmdgit diff --checkSigned-off-by: ADITYA CHAUHAN hooiv@users.noreply.github.com