Skip to content

netfilter: nf_tables: use NLA_POLICY_MASK instead of manual checks

Florian Westphal netdev netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2netlink: allow be16 and be32 types in all uint policy checksinclude/net/netlink.h lib/nlattr.c+9 -74 replies
2/2netfilter: nf_tables: use NLA_POLICY_MASK to test for valid flag optionsnet/netfilter/nft_fib.c net/netfilter/nft_lookup.c net/netfilter/nft_masq.c +2 more+18 -250 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: use NLA_POLICY_MASK instead of manual checks

nf_tables still uses manual attribute validation in multiple places. Make NLA_POLICY_MASK available with NLA_BE16/NLA_BE32 and then start using it for flag attribute validation.

Florian Westphal (2):
netlink: allow be16 and be32 types in all uint policy checks
netfilter: nf_tables: use NLA_POLICY_MASK to test for valid flag
options

 include/net/netlink.h      | 10 +++-------
 lib/nlattr.c               |  6 ++++++
 net/netfilter/nft_fib.c    | 13 +++++++------
 net/netfilter/nft_lookup.c |  6 ++----
 net/netfilter/nft_masq.c   |  8 +++-----
 net/netfilter/nft_nat.c    |  8 +++-----
 net/netfilter/nft_redir.c  |  8 +++-----
 7 files changed, 27 insertions(+), 32 deletions(-)
Signature · 1 line
2.41.0