From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org>,
Florian Westphal <fw@strlen.de>
Subject: [PATCH nf-next 0/2] netfilter: nf_tables: use NLA_POLICY_MASK instead of manual checks
Date: Tue, 18 Jul 2023 09:52:28 +0200 [thread overview]
Message-ID: <20230718075234.3863-1-fw@strlen.de> (raw)
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(-)
--
2.41.0
next reply other threads:[~2023-07-18 7:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 7:52 Florian Westphal [this message]
2023-07-18 7:52 ` [PATCH nf-next 1/2] netlink: allow be16 and be32 types in all uint policy checks Florian Westphal
2023-07-18 18:56 ` Jakub Kicinski
2023-07-19 2:53 ` Florian Westphal
2023-07-19 3:13 ` Jakub Kicinski
2023-07-19 7:19 ` Jozsef Kadlecsik
2023-07-18 7:52 ` [PATCH nf-next 2/2] netfilter: nf_tables: use NLA_POLICY_MASK to test for valid flag options Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230718075234.3863-1-fw@strlen.de \
--to=fw@strlen.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).