-
Notifications
You must be signed in to change notification settings - Fork 3.4k
bpf: support ipv6 egressgateway policies #37713
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
c67c8e3
to
fc118e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I just took a first pass to sketch out the packet flow, so we're aligned on what those parts do. It looks complete 🙂.
One subtle thing to check is whether when masquerading (on the gateway node), we already pass back the correct CTX_ACT_REDIRECT (when bouncing the packet to a different egress interface) and orig_addr
for send_trace_notify6()
. I remember taking some shortcuts back then, because we only needed it for IPv4 ...
0a5c0e3
to
1f75f98
Compare
Found it, this is what I meant: cilium/bpf/lib/nodeport_egress.h Line 120 in 457fdd8
|
I'll address the missing bits in Currently struggling quite a bit with getting the redirect from host to gateway test to run with ipv6. Verifier seems to dislike my ipv6 translation of the test quite a bit. Any suggestions? |
18b0201
to
766dadb
Compare
f48954d
to
1f3fa50
Compare
Ran verifier tests against main and my branch on minimum supported kernel version (5.4), no huge differences in complexity:
Given the limit of 1000000 ins, this shouldn't be a concern I hope. |
/test |
Looks like I've hit #32387 in https://github.com/cilium/cilium/actions/runs/13655381077/job/38173190618 |
1f3fa50
to
95d5260
Compare
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, looks close to ship already!
Took a first swing over the production code, will come back for the tests later :)
95d5260
to
13cc450
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests lgtm as well, thank you!
3172e25
to
3984364
Compare
/test |
3984364
to
024846b
Compare
/test |
Looks like I need to make some general adjustments after Timos recent PR to remove dynamic map names. |
This commit enables ipv6 egressgateway policies at the datapath level, ensuring that IPv6 traffic can be matched when respective policies are in place. It should be noted that intra cluster traffic that needs to be redirected to the correct gateway node, is still going through an IPv4 tunnel. Apart from that, all the newly IPv6 related changes in this commit should be akin to the already existing code paths that provide the egressgateway functionality for IPv4 traffic. Signed-off-by: Robin Gögge <r.goegge@isovalent.com>
This commit provides a translation of the existing IPv4 BPF integration test suites for egressgateway policies into IPv6 equivalent tests. Signed-off-by: Robin Gögge <r.goegge@isovalent.com>
024846b
to
8318a8a
Compare
/test |
Looks good now :) |
Looks like the checkpatch is failing
|
@ysksuzuki Yes, that is known and was discussed (I'll cc you on the resolved discussion). TL;DR, the equivalent ipv4 code looks exactly the same, so I figured it's fine to violate checkpatch in that one instance. |
Oh, I missed that comment. Thanks! |
This PR enables ipv6 egressgateway policies at the datapath level, ensuring that IPv6 traffic can be matched when respective policies are in place. It should be noted that intra cluster traffic that needs to be redirected to the correct gateway node, is still going through an IPv4 tunnel.
Apart from that, all the newly IPv6 related changes in this commit should be akin to the already existing code paths that provide the egressgateway functionality for IPv4 traffic.
It also adds the same tests as we currently have for ipv4 policies.