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

Fix: NFT_DYNSET_F_EXPR not supported for kernels < 5.11-rc3 #276

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

Ignatella
Copy link
Contributor

@Ignatella Ignatella commented Sep 11, 2024

Hi!

We noticed that NFT_DYNSET_F_EXPR flag added in v5.11-rc3 is also used with kernels which don't support NFTA_DYNSET_EXPRESSIONS (<v5.11-rc1). The flag was added in the patchset not to fail silently.

The described behavior causes error for older kernels, what this contribution aims to fix.

@stapelberg
Copy link
Collaborator

@turekt As the original contributor of the dynset code, can you take a look at this PR please? Thank you.

@turekt
Copy link
Contributor

turekt commented Sep 12, 2024

Hi @stapelberg and @Ignatella,

this is a known issue previously discussed in #215. I have checked the original code and it seems that NFT_DYNSET_F_EXPR flag is set only when multiple expressions are used in dynset (see https://git.netfilter.org/nftables/tree/src/netlink_linearize.c?id=036a1eb3304995e4e000c552b9dfd33b1073ddb6#n1566) so this PR makes sense.

Note that this will fix support for single expressions on older kernels but multiple expressions on older kernels will remain unsupported as NFT_DYNSET_F_EXPR flag should not be omitted for dynsets with multiple expressions.

LGTM

@stapelberg stapelberg merged commit 583cd2b into google:main Sep 13, 2024
2 checks passed
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.

3 participants