kernel_optimize_test/net/bridge
Tobias Jungel a285860211 bridge: netlink: check vlan_default_pvid range
Currently it is allowed to set the default pvid of a bridge to a value
above VLAN_VID_MASK (0xfff). This patch adds a check to br_validate and
returns -EINVAL in case the pvid is out of bounds.

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

Fixes: 0f963b7592 ("bridge: netlink: add support for default_pvid")
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Tobias Jungel <tobias.jungel@bisdn.de>
Acked-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-05-18 10:15:00 -04:00
..
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf 2017-05-03 10:11:26 -04:00
br_device.c bridge: move bridge multicast cleanup to ndo_uninit 2017-04-25 14:02:39 -04:00
br_fdb.c net: bridge: Fix improper taking over HW learned FDB 2017-04-30 22:46:32 -04:00
br_forward.c bridge: add per-port broadcast flood flag 2017-04-27 16:34:29 -04:00
br_if.c bridge: add per-port broadcast flood flag 2017-04-27 16:34:29 -04:00
br_input.c
br_ioctl.c
br_mdb.c net: rtnetlink: plumb extended ack to doit function 2017-04-17 15:35:38 -04:00
br_multicast.c
br_netfilter_hooks.c
br_netfilter_ipv6.c
br_netlink_tunnel.c
br_netlink.c bridge: netlink: check vlan_default_pvid range 2017-05-18 10:15:00 -04:00
br_nf_core.c
br_private_stp.h
br_private_tunnel.h
br_private.h
br_stp_bpdu.c
br_stp_if.c
br_stp_timer.c
br_stp.c
br_switchdev.c
br_sysfs_br.c
br_sysfs_if.c bridge: add per-port broadcast flood flag 2017-04-27 16:34:29 -04:00
br_vlan_tunnel.c
br_vlan.c
br.c
Kconfig
Makefile