Skip to content

ctmap: Change order of active maps#44729

Merged
brb merged 1 commit intomainfrom
pr/brb/fix-ct-map-order
Mar 11, 2026
Merged

ctmap: Change order of active maps#44729
brb merged 1 commit intomainfrom
pr/brb/fix-ct-map-order

Conversation

@brb
Copy link
Copy Markdown
Member

@brb brb commented Mar 11, 2026

The ActiveMaps() method returns list of open CT maps. The list is used by the GC routine. The routine passes relevant CT maps to the PurgeOrphanNATEntries. The latter expects the TCP CT map to be the first one:

ctMapTCP, ctMapAny := maps[i], maps[i+1]

However, the 3872944 commit changed the order of the maps in the list. Bring it back, otherwise the PurgeOrphanNATEntries keeps deleting valid NAT entries (as it cannot find in the CT map).

Fixes: 3872944 ("ct/map: introduce hive cell") (cc @mhofstetter)

NOTE: will make the code more robust in a subsequent PR.

Fix #44727

The ActiveMaps() method returns list of open CT maps. The list is used
by the GC routine. The routine passes relevant CT maps to the
PurgeOrphanNATEntries. The latter expects the TCP CT map to be the first
one:

    ctMapTCP, ctMapAny := maps[i], maps[i+1]

However, the 3872944 commit changed the order of the maps in the
list. Bring it back, otherwise the PurgeOrphanNATEntries keeps deleting
valid NAT entries (as it cannot find in the CT map).

Fixes: 3872944 ("ct/map: introduce hive cell")
Signed-off-by: Martynas Pumputis <martynas@isovalent.com>
@brb brb added area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/bug This PR fixes an issue in a previous release of Cilium. feature/conntrack affects/v1.19 This issue affects v1.19 branch needs-backport/1.19 This PR / issue needs backporting to the v1.19 branch labels Mar 11, 2026
@brb
Copy link
Copy Markdown
Member Author

brb commented Mar 11, 2026

/test

@brb brb marked this pull request as ready for review March 11, 2026 13:07
@brb brb requested a review from a team as a code owner March 11, 2026 13:07
@brb brb requested a review from harsimran-pabla March 11, 2026 13:07
@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 Mar 11, 2026
@brb brb added this pull request to the merge queue Mar 11, 2026
Merged via the queue into main with commit b4882df Mar 11, 2026
690 of 705 checks passed
@brb brb deleted the pr/brb/fix-ct-map-order branch March 11, 2026 16:01
@smagnani96 smagnani96 mentioned this pull request Mar 16, 2026
10 tasks
@smagnani96 smagnani96 added backport-pending/1.19 The backport for Cilium 1.19.x for this PR is in progress. and removed needs-backport/1.19 This PR / issue needs backporting to the v1.19 branch labels Mar 16, 2026
@github-actions github-actions bot added backport-done/1.19 The backport for Cilium 1.19.x for this PR is done. and removed backport-pending/1.19 The backport for Cilium 1.19.x for this PR is in progress. labels Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

affects/v1.19 This issue affects v1.19 branch area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. backport-done/1.19 The backport for Cilium 1.19.x for this PR is done. feature/conntrack ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PurgeOrphanNATEntries removed valid NAT entries

4 participants