From: Sabrina Dubroca <sd@queasysnail.net>
To: Tobias Jungel <tobias.jungel@bisdn.de>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH] bridge: netlink: check vlan_default_pvid range
Date: Mon, 15 May 2017 14:01:20 +0200 [thread overview]
Message-ID: <20170515120120.GA13122@bistromath.localdomain> (raw)
In-Reply-To: <20170515110819.11847-1-tobias.jungel@bisdn.de>
Hi Tobias,
2017-05-15, 13:08:19 +0200, Tobias Jungel wrote:
> Currently it is allowed to set the default pvid of a bridge to a value
> above VLAN_VID_MASK (0xfff). This patch checks the passed pvid and
> disables the pvid in case it is out of bounds.
Could we return an error (-EINVAL) to userspace instead? Silently
disabling the feature seems confusing to me. This would probably be
better in br_validate() (like the IFLA_BR_VLAN_PROTOCOL check), since
there's already such a check when setting default_pvid from sysfs (in
br_vlan_set_default_pvid()).
>
> Reproduce by calling:
>
> [root@test ~]# ip l a type bridge
> [root@test ~]# ip l a type dummy
> [root@test ~]# ip l s bridge0 type bridge vlan_filtering 1
> [root@test ~]# ip l s bridge0 type bridge vlan_default_pvid 9999
> [root@test ~]# ip l s dummy0 master bridge0
> [root@test ~]# bridge vlan
> port vlan ids
> bridge0 9999 PVID Egress Untagged
>
> dummy0 9999 PVID Egress Untagged
You'll also need to add a Signed-off-by, and a Fixes tag would be nice.
Thanks,
--
Sabrina
next prev parent reply other threads:[~2017-05-15 12:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-15 11:08 [PATCH] bridge: netlink: check vlan_default_pvid range Tobias Jungel
2017-05-15 12:01 ` Sabrina Dubroca [this message]
2017-05-15 13:21 ` Tobias Jungel
2017-05-15 13:29 ` Nikolay Aleksandrov
2017-05-15 13:31 ` Nikolay Aleksandrov
2017-05-15 14:38 ` Tobias Jungel
2017-05-15 12:05 ` Nikolay Aleksandrov
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=20170515120120.GA13122@bistromath.localdomain \
--to=sd@queasysnail.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=tobias.jungel@bisdn.de \
/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