Skip to content

netfilter: nf_tables: move ruleset validation state to table

Florian Westphal netfilter-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2netfilter: nf_tables: don't write table validation state without mutexinclude/linux/netfilter/nfnetlink.h net/netfilter/nf_tables_api.c net/netfilter/nfnetlink.c+2 -90 replies
2/2netfilter: nf_tables: make validation state per tableinclude/net/netfilter/nf_tables.h net/netfilter/nf_tables_api.c+20 -210 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH nf-next 0/2] netfilter: nf_tables: move ruleset validation state to table

At this time nf_tables will valiate all tables before committing the new rules.

Unfortunately this has two drawbacks:
1. Since addition of the transaction mutex pernet state gets written to outside of the locked section from the cleanup callback, this is wrong so do this cleanup directly after table has passed all checks.

2. We revalidate tables that saw no changes.
This can be avoided by keeping the validation state per table, not per net.

Florian Westphal (2):
netfilter: nf_tables: don't write table validation state without mutex
netfilter: nf_tables: make validation state per table

 include/linux/netfilter/nfnetlink.h |  1 -
 include/net/netfilter/nf_tables.h   |  3 +-
 net/netfilter/nf_tables_api.c       | 44 +++++++++++++----------------
 net/netfilter/nfnetlink.c           |  2 --
 4 files changed, 21 insertions(+), 29 deletions(-)
Signature · 1 line
2.39.2