summaryrefslogtreecommitdiff
path: root/net/switchdev
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-10-20 06:08:27 -0700
committerDavid S. Miller <davem@davemloft.net>2015-10-20 06:08:27 -0700
commit26440c835f8b1a491e2704118ac55bf87334366c (patch)
tree3c2d23b59fd49b252fdbf6c09efc41b354933fc6 /net/switchdev
parent371f1c7e0d854796adc622cc3bacfcc5fc638db1 (diff)
parent1099f86044111e9a7807f09523e42d4c9d0fb781 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/usb/asix_common.c net/ipv4/inet_connection_sock.c net/switchdev/switchdev.c In the inet_connection_sock.c case the request socket hashing scheme is completely different in net-next. The other two conflicts were overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/switchdev')
-rw-r--r--net/switchdev/switchdev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index 73e3895175cf..1eb76956b439 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -19,6 +19,7 @@
#include <linux/if_bridge.h>
#include <linux/list.h>
#include <linux/workqueue.h>
+#include <linux/if_vlan.h>
#include <net/ip_fib.h>
#include <net/switchdev.h>
@@ -846,6 +847,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)