From: Florian Westphal <fw@strlen.de>
To: Patrick McHardy <kaber@trash.net>
Cc: Florian Westphal <fw@strlen.de>,
pablo@netfilter.org, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] proto: fix VLAN header definition
Date: Fri, 27 Nov 2015 11:34:28 +0100 [thread overview]
Message-ID: <20151127103428.GC15392@breakpoint.cc> (raw)
In-Reply-To: <20151127095424.GF4263@macbook.localdomain>
Patrick McHardy <kaber@trash.net> wrote:
> On 27.11, Florian Westphal wrote:
> > Patrick McHardy <kaber@trash.net> wrote:
> > > The VID is located after Priority and CFI.
> >
> > With this patch matching on vlan id does not work for me anymore
> > on x86-64.
> >
> > With trace-patch nft but without this patch:
> >
> > table bridge filter {
> > chain input {
> > type filter hook input priority -200; policy accept;
> > vlan id 4094 counter packets 827 bytes 63839
> >
> > With this patch, the counters remain at zero:
> >
> > unknown unknown & 0xfff [invalid type] == 0xffe [invalid type] counter packets 850 bytes 65375
> > vlan id 4094 counter packets 0 bytes 0
> >
> > (The 'unknown unknown' line is the 'old' vlan rule added by unpatched
> > nft binary, the 'vlan id' is the one added with the patched one).
>
> Odd, since it decodes correctly. Could you send the output of
> nft --debug=netlink with and without the patch?
master:
nft --debug=netlink add rule bridge filter input vlan id 4094 counter
bridge filter input
[ payload load 2b @ link header + 12 => reg 1 ]
[ cmp eq reg 1 0x00000081 ]
[ payload load 2b @ link header + 14 => reg 1 ]
[ bitwise reg 1 = (reg=1 & 0x0000ff0f ) ^ 0x00000000 ]
[ cmp eq reg 1 0x0000fe0f ]
[ counter pkts 0 bytes 0 ]
patched:
# src/nft --debug=netlink add rule bridge filter input vlan id 4094 counter
bridge filter input
[ payload load 2b @ link header + 12 => reg 1 ]
[ cmp eq reg 1 0x00000081 ]
[ payload load 2b @ link header + 14 => reg 1 ]
[ bitwise reg 1 = (reg=1 & 0x0000f0ff ) ^ 0x00000000 ]
[ cmp eq reg 1 0x0000e0ff ]
[ counter pkts 0 bytes 0 ]
next prev parent reply other threads:[~2015-11-27 10:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 9:13 [PATCH nft] proto: fix VLAN header definition Patrick McHardy
2015-11-27 9:49 ` Florian Westphal
2015-11-27 9:54 ` Patrick McHardy
2015-11-27 10:34 ` Florian Westphal [this message]
2015-11-27 10:42 ` Florian Westphal
2015-11-27 10:49 ` Patrick McHardy
2015-11-27 10:54 ` Florian Westphal
2015-11-27 11:00 ` Patrick McHardy
2015-11-28 23:32 ` Pablo Neira Ayuso
2015-11-29 0:09 ` Florian Westphal
2015-11-29 22:00 ` Pablo Neira Ayuso
2015-11-29 22:37 ` Florian Westphal
2015-11-30 12:31 ` Pablo Neira Ayuso
2015-11-30 13:53 ` Florian Westphal
2015-11-30 13:57 ` Pablo Neira Ayuso
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=20151127103428.GC15392@breakpoint.cc \
--to=fw@strlen.de \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--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).