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
[v1.14] bpf: nodeport: update TTL / hop-limit on redirect #27379
Merged
Conversation
This file contains 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
[ upstream commit 8fe8e93 ] When forwarding from the XDP LB to a remote NAT backend, tail_nodeport_nat_egress_ipv4() potentially adds outer tunnel headers to the packet. The call to fib_redirect_v4() then decrements outer header's TTL, not the inner IPv4 header. Fix this by manually updating the TTL, and open-coding the redirect. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
[ upstream commit 83a53d7 ] When forwarding from the LB to a remote NAT backend, tail_nodeport_nat_egress_ipv6() uses fib_redirect() to pick the egress interface (we can't use fib_redirect_v6() as the packet might have been converted to IPv4, or tunnel-encapsulated in XDP). Thus the hop-limit currently doesn't get updated. Do so manually, before potentially adding the tunnel encapsulation. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
maintainer-s-little-helper
bot
added
backport/1.14
This PR represents a backport for Cilium 1.14.x of a PR that was merged to main.
kind/backports
This PR provides functionality previously merged into master.
labels
Aug 9, 2023
/test-backport-1.14 |
[ upstream commit 09be401 ] When forwarding replies from the LB (or EgressGW replies) back to the client, rev_nodeport_lb4() potentially adds outer tunnel headers to the packet. The call to fib_redirect_v4() then decrements outer header's TTL, not the inner IPv4 header. Fix this by manually updating the TTL, and open-coding the redirect. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
[ upstream commit 9e29ea6 ] When forwarding replies from the LB back to the client, rev_nodeport_lb6() uses fib_redirect() to pick the egress interface (we can't use fib_redirect_v6() as the packet might have been converted to IPv4, or tunnel-encapsulated in XDP). Thus the hop-limit currently doesn't get updated. Do so manually. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
julianwiedmann
force-pushed
the
v1.14-nodeport-ttl
branch
from
August 9, 2023 11:30
e892b75
to
30d27d1
Compare
/test-backport-1.14 |
julianwiedmann
added
the
dont-merge/wait-until-release
Freeze window for current release is blocking non-bugfix PRs
label
Aug 10, 2023
Manual backport due to trivial contextual conflicts. No changes in behaviour that needed to be addressed. |
ldelossa
approved these changes
Aug 11, 2023
jschwinger233
approved these changes
Aug 14, 2023
julianwiedmann
removed
the
dont-merge/wait-until-release
Freeze window for current release is blocking non-bugfix PRs
label
Aug 15, 2023
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
Aug 15, 2023
lmb
approved these changes
Aug 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport/1.14
This PR represents a backport for Cilium 1.14.x of a PR that was merged to main.
kind/backports
This PR provides functionality previously merged into master.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
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.
Manual backport of
Once this PR is merged, you can update the PR labels via:
or with