diff options
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 73e3895175cf..1eb76956b439 100644 --- a/net/switchdev/switchdev.c +++ b/net/switchdev/switchdev.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/if_bridge.h> | 19 | #include <linux/if_bridge.h> |
| 20 | #include <linux/list.h> | 20 | #include <linux/list.h> |
| 21 | #include <linux/workqueue.h> | 21 | #include <linux/workqueue.h> |
| 22 | #include <linux/if_vlan.h> | ||
| 22 | #include <net/ip_fib.h> | 23 | #include <net/ip_fib.h> |
| 23 | #include <net/switchdev.h> | 24 | #include <net/switchdev.h> |
| 24 | 25 | ||
| @@ -846,6 +847,8 @@ static int switchdev_port_br_afspec(struct net_device *dev, | |||
| 846 | if (nla_len(attr) != sizeof(struct bridge_vlan_info)) | 847 | if (nla_len(attr) != sizeof(struct bridge_vlan_info)) |
| 847 | return -EINVAL; | 848 | return -EINVAL; |
| 848 | vinfo = nla_data(attr); | 849 | vinfo = nla_data(attr); |
| 850 | if (!vinfo->vid || vinfo->vid >= VLAN_VID_MASK) | ||
| 851 | return -EINVAL; | ||
| 849 | vlan.flags = vinfo->flags; | 852 | vlan.flags = vinfo->flags; |
| 850 | if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_BEGIN) { | 853 | if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_BEGIN) { |
| 851 | if (vlan.vid_begin) | 854 | if (vlan.vid_begin) |
