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

[v1.14] bpf: improve trace events in SNAT path #30835

Merged
merged 2 commits into from Feb 22, 2024

Conversation

julianwiedmann
Copy link
Member

@julianwiedmann julianwiedmann commented Feb 19, 2024

Manual backport of #28723, as the SNAT code looks slightly different in v1.14.

Once this PR is merged, a GitHub action will update the labels of these PRs:

 28723

[ upstream commit 2853c52 ]

[ backporter's notes: obtaining the pre-SNAT address is a bit more
  complicated in the v1.14 code base ...]

When applying SNAT to a packet, also report the original source address in
the subsequent trace event. This helps to associate the internal and
external view of a connection.

We use the `orig_addr` field in the trace event, which was originally
introduced back with b3aa583 ("bpf: Report original source IP in TRACE_TO_LXC")

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
[ upstream commit 1113d70 ]

This helps to clarify the exact origin of a TO_NETWORK trace event.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
@maintainer-s-little-helper 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 Feb 19, 2024
@julianwiedmann
Copy link
Member Author

/test-backport-1.14

@julianwiedmann julianwiedmann marked this pull request as ready for review February 19, 2024 08:29
@julianwiedmann julianwiedmann requested a review from a team as a code owner February 19, 2024 08:29
@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 Feb 22, 2024
@ti-mo ti-mo merged commit d086a71 into cilium:v1.14 Feb 22, 2024
60 checks passed
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants