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.12] ctmap: consider CT entry's .dsr flag in PurgeOrphanNATEntries() #29683

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

[ upstream commit 74b3f56 ]

CT entries that get created for a DSR connection by the datapath will have
the `dsr` flag set. Reflect this in the CT entries that we use for tests.

The flag currently doesn't make a difference for the GC logic, but let's
still be a bit more accurate.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
[ upstream commit dfbae95 ]

[ backporter's notes: also bring back isDsrEntry() ]

The BPF datapath potentially re-creates a CT entry, in particular when a
DSR connection gets re-opened as local connection. Such a re-purposed CT
entry then leaves a DSR NAT entry behind.

Currently we wouldn't clean up such NAT entries (as the matching CT entry
still exists). But once we look at the CT entry's .dsr flag, we understand
that the CT entry is actually no longer a match for the NAT entry.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Signed-off-by: Nicolas Busseneau <nicolas@isovalent.com>
@maintainer-s-little-helper maintainer-s-little-helper bot added backport/1.12 This PR represents a backport for Cilium 1.12.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. labels Dec 7, 2023
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann
Copy link
Member Author

/test-backport-1.12

@julianwiedmann
Copy link
Member Author

/test-1.24-net-next

@julianwiedmann julianwiedmann marked this pull request as ready for review December 10, 2023 14:31
@julianwiedmann julianwiedmann requested a review from a team as a code owner December 10, 2023 14:31
@aanm aanm merged commit fffa54e into cilium:v1.12 Dec 11, 2023
91 checks passed
@julianwiedmann julianwiedmann deleted the v1.12-ctmap-test branch December 11, 2023 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.12 This PR represents a backport for Cilium 1.12.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants