From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: wenxu@ucloud.cn, fw@strlen.de, netfilter-devel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH 1/2 nf-next v3] netfilter: nft_meta: Add NFT_META_BRI_IIFVPROTO support
Date: Wed, 3 Jul 2019 14:23:13 +0200 [thread overview]
Message-ID: <20190703122313.cidsxiaao6y2b6pt@salvia> (raw)
In-Reply-To: <366e228f-7253-e388-4799-f0f9c18d1111@cumulusnetworks.com>
On Wed, Jul 03, 2019 at 03:08:01PM +0300, Nikolay Aleksandrov wrote:
> On 28/06/2019 03:49, wenxu@ucloud.cn wrote:
> > From: wenxu <wenxu@ucloud.cn>
> >
> > This patch provide a meta to get the bridge vlan proto
> >
> > nft add rule bridge firewall zones counter meta br_vlan_proto 0x8100
> >
> > Signed-off-by: wenxu <wenxu@ucloud.cn>
> > ---
> > include/uapi/linux/netfilter/nf_tables.h | 2 ++
> > net/netfilter/nft_meta.c | 9 +++++++++
> > 2 files changed, 11 insertions(+)
> >
>
> Hi,
> When using the internal bridge API outside of the bridge I'd advise you to CC bridge
> maintainers as well.
Will keep this mind, thanks.
> This patch is clearly wrong since you cannot access the vlan
> fields directly because bridge vlan support might be disabled from the kernel config
> as Pablo has noticed as well. In general I'd try to avoid using the internal API directly,
> but that is a different matter.
BROPT_VLAN_ENABLED is exposed through netlink and sysfs, and this only
consults the value. I guess you refer to the fact that...
> Please consult with include/linux/if_bridge.h for exported
> functions that are supposed to be visible outside of the bridge, if you need anything else
> make sure to add support for it there. The usage of br_opt_get directly for example must
> be changed to br_vlan_enabled().
Indeed... this patch should be using br_vlan_enabled() instead.
Thanks.
prev parent reply other threads:[~2019-07-03 12:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 0:49 [PATCH 1/2 nf-next v3] netfilter: nft_meta: Add NFT_META_BRI_IIFVPROTO support wenxu
2019-06-28 0:49 ` [PATCH 2/2 nf-next v3] netfilter:nft_meta: Add NFT_META_VLAN support wenxu
2019-07-02 23:46 ` [PATCH 1/2 nf-next v3] netfilter: nft_meta: Add NFT_META_BRI_IIFVPROTO support Pablo Neira Ayuso
2019-07-03 11:41 ` Pablo Neira Ayuso
2019-07-03 12:08 ` Nikolay Aleksandrov
2019-07-03 12:23 ` Pablo Neira Ayuso [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=20190703122313.cidsxiaao6y2b6pt@salvia \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=wenxu@ucloud.cn \
/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).