From: Florian Westphal <fw@strlen.de>
To: Xiao Liang <shaw.leon@gmail.com>
Cc: Florian Westphal <fw@strlen.de>,
netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft] src: Don't parse string as verdict in map
Date: Thu, 18 Aug 2022 18:34:31 +0200 [thread overview]
Message-ID: <20220818163431.GA32331@breakpoint.cc> (raw)
In-Reply-To: <CABAhCOR-YpTt6YNhOvnf3dtVEDjx52SfRb-R_YvzntEp=yHb-Q@mail.gmail.com>
Xiao Liang <shaw.leon@gmail.com> wrote:
> On Thu, Aug 18, 2022 at 9:32 PM Florian Westphal <fw@strlen.de> wrote:
> >
> > Can you explain what this is fixing?
>
> See this example:
> table t {
> map foo {
> type ipv4_addr : verdict
> elements = {
> 192.168.0.1 : bar
> }
> }
> chain output {
> type filter hook output priority mangle;
> ip daddr vmap @foo
> }
> }
>
> Though "bar" is not a valid verdict (should be "jump bar" or
> something), the string is taken as the element value. Then
> NFTA_DATA_VALUE is sent to the kernel instead of NFTA_DATA_VERDICT.
> Recent kernel checks the type and returns error, but olders (e.g.
> v5.4.x) doesn't, causing a warning when the rule is hit:
>
> [5120263.467627] WARNING: CPU: 12 PID: 303303 at
> net/netfilter/nf_tables_core.c:229 nft_do_chain+0x394/0x500
> [nf_tables]
Thanks. All of this info should be included in the commit message.
Perhaps adding a test case is warrented as well.
prev parent reply other threads:[~2022-08-18 16:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 10:06 [PATCH nft] src: Don't parse string as verdict in map Xiao Liang
2022-08-18 13:32 ` Florian Westphal
2022-08-18 16:02 ` Xiao Liang
2022-08-18 16:34 ` Florian Westphal [this message]
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=20220818163431.GA32331@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=shaw.leon@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.