Skip to content
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

bpf: egressgw: pass IPv4 tuple to egress_gw_request_needs_redirect #27851

Merged
merged 2 commits into from Sep 1, 2023

Conversation

jibi
Copy link
Member

@jibi jibi commented Aug 31, 2023

pass the IPv4 tuple to egress_gw_request_needs_redirect instead of the
full IP header as only the source and destination addresses are needed
to match an egress gateway policy

@jibi jibi added release-note/misc This PR makes changes that have no direct user impact. feature/egress-gateway Impacts the egress IP gateway feature. labels Aug 31, 2023
@jibi jibi requested review from a team as code owners August 31, 2023 15:08
@jibi jibi force-pushed the pr/jibi/egressgw-snat-needed-ctx branch from 0a6f3c1 to 42e7161 Compare August 31, 2023 16:44
@jibi jibi changed the title bpf: egressgw: pass ctx to egress_gw_request_needs_redirect bpf: egressgw: pass IPv4 tuple to egress_gw_request_needs_redirect Aug 31, 2023
@jibi jibi force-pushed the pr/jibi/egressgw-snat-needed-ctx branch 3 times, most recently from 32ac4c8 to da3f984 Compare August 31, 2023 16:55
Copy link
Member

@julianwiedmann julianwiedmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thanks!

bpf/lib/egress_gateway.h Show resolved Hide resolved
@julianwiedmann
Copy link
Member

/test

these helpers return the actual source and destination address of a
given reversed ipv4 ct tuple, hiding some of the complexity around these
tuples having the source and destination addresses swapped

Signed-off-by: Gilberto Bertin <jibi@cilium.io>
pass the IPv4 tuple to egress_gw_request_needs_redirect instead of the
full IP header as only the source and destination addresses are needed
to match an egress gateway policy

Signed-off-by: Gilberto Bertin <jibi@cilium.io>
@jibi jibi force-pushed the pr/jibi/egressgw-snat-needed-ctx branch from da3f984 to a039f79 Compare September 1, 2023 08:05
@jibi
Copy link
Member Author

jibi commented Sep 1, 2023

/test

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 1, 2023
@jibi jibi merged commit 90a9402 into main Sep 1, 2023
209 checks passed
@jibi jibi deleted the pr/jibi/egressgw-snat-needed-ctx branch September 1, 2023 09:22
@jibi jibi added the needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch label Sep 6, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.14.2 Sep 6, 2023
@jibi jibi removed the needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch label Sep 6, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed this from Needs backport from main in 1.14.2 Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/egress-gateway Impacts the egress IP gateway feature. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants