diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-10-28 13:17:01 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-10-28 13:17:20 +0100 |
commit | e4340bbb07dd38339c0773543dd928886e512a57 (patch) | |
tree | f38d9d2f929037325362328415b2a1e7bfe52a15 /net/switchdev/switchdev.c | |
parent | c13dc31adb04c3f85d54d2fa13e34206f25742eb (diff) | |
parent | a22c4d7e34402ccdf3414f64c50365436eba7b93 (diff) |
Merge branch 'linus' into core/rcu, to fix up a semantic conflict
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/switchdev/switchdev.c')
-rw-r--r-- | net/switchdev/switchdev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c index fda38f830a10..77f5d17e2612 100644 --- a/net/switchdev/switchdev.c +++ b/net/switchdev/switchdev.c @@ -16,6 +16,7 @@ #include <linux/notifier.h> #include <linux/netdevice.h> #include <linux/if_bridge.h> +#include <linux/if_vlan.h> #include <net/ip_fib.h> #include <net/switchdev.h> @@ -634,6 +635,8 @@ static int switchdev_port_br_afspec(struct net_device *dev, if (nla_len(attr) != sizeof(struct bridge_vlan_info)) return -EINVAL; vinfo = nla_data(attr); + if (!vinfo->vid || vinfo->vid >= VLAN_VID_MASK) + return -EINVAL; vlan->flags = vinfo->flags; if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_BEGIN) { if (vlan->vid_begin) |