Skip to content

Mimic ipset C code for determining correct default ipset revision for hash:ip{port,net,etc}#1031

Merged
aboch merged 1 commit intovishvananda:mainfrom
bleggett:bleggett/correctly-derive-ipset-revision
May 9, 2025
Merged

Mimic ipset C code for determining correct default ipset revision for hash:ip{port,net,etc}#1031
aboch merged 1 commit intovishvananda:mainfrom
bleggett:bleggett/correctly-derive-ipset-revision

Conversation

@bleggett
Copy link
Copy Markdown
Contributor

@bleggett bleggett commented Nov 18, 2024

Fixes #1030

It takes both desired features AND set type into account when determining the "correct" default revision, which is how it actually works in the ipset userspace binary.

e.g.

hash:ip,port,net

  • with comment support? Revision 5.
  • with counter support? Revision 4.

etc etc.

A more exhaustive mapping would be ideal, but this PR only does default revision mappings for the ipset types that previously had revision defaulting logic, and not all possible ipset types globally.

@bleggett bleggett force-pushed the bleggett/correctly-derive-ipset-revision branch 3 times, most recently from 437fb9b to d1562a9 Compare November 18, 2024 23:00
Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
@bleggett bleggett force-pushed the bleggett/correctly-derive-ipset-revision branch from d1562a9 to bf21466 Compare November 18, 2024 23:02
@aboch
Copy link
Copy Markdown
Collaborator

aboch commented May 9, 2025

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ipset revision usage is inconsistent with ipset binary from netfilter

2 participants