diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-27 09:13:38 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-27 09:13:38 +0900 |
| commit | cf516d08eceb4c442f0f2f1a73ebf994b1dbf0ed (patch) | |
| tree | a56d5024a453bb323039f7c481ac17738269e24f /net/switchdev | |
| parent | 047e6646579c2853afba0111f573796daf4fd485 (diff) | |
| parent | 32b88194f71d6ae7768a29f87fbba454728273ee (diff) | |
Merge 4.3-rc7 into staging-next
We want the other staging patches in this branch as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/switchdev')
| -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) |
