-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Support host firewall with IPv6 BPF masquerading #26323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d02b75b
to
82c51cb
Compare
/test |
bddad09
to
afce03c
Compare
Function whitelist_snated_egress_connections() allows responses to SNATed packets to come through without enforcing the host policy. So far, only the IPv4 path has used this; but IPv6 support is coming and will need an equivalent function. In preparation for that, let's prefix the function name with "ipv4_". Since we're at it, let's also replace the "whitelist" by a more neutral term. We also fix references in comments, including where they wrongly refer to ipv4_host_policy_egress(). Signed-off-by: Quentin Monnet <quentin@isovalent.com>
If kube-proxy is in use (no BPF-based masquerading), packets from pods may be SNATed. The response packet will therefore have a host IP as the destination IP. This was addressed for IPv4 in commit dc6a065 ("bpf: Bypass host fw for kube-proxy SNATed connections"). Now that we have support for IPv6 masquerading (currently not allowed with host firewall), we must replicate the same behaviour on the IPv6 path. Signed-off-by: Quentin Monnet <quentin@isovalent.com>
This reverts commit 934e1f2. Now that we have updated the host firewall code to make it compatible with IPv6 BPF masquerade, we can enable the two features together. Signed-off-by: Quentin Monnet <quentin@isovalent.com>
afce03c
to
699afe2
Compare
This pull request has been automatically marked as stale because it |
This pull request has not seen any activity since it was marked stale. |
@qmonnet is it time to merge this? |
The PR needs a rebase, plus some validation from people more familiar with the host firewall than I am. Maybe some CI coverage as well. I do intend to come back to this at some point, but no ETA. |
Completed in #28813 - Although we could merge the test updates from the current PR, too. |
Now superseded by #31511 |
[In progress]