aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q/vlan_netlink.c')
-rw-r--r--net/8021q/vlan_netlink.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c
index 844c7e43d0fa..6cdd1e015e2d 100644
--- a/net/8021q/vlan_netlink.c
+++ b/net/8021q/vlan_netlink.c
@@ -41,6 +41,13 @@ static int vlan_validate(struct nlattr *tb[], struct nlattr *data[])
41 u16 id; 41 u16 id;
42 int err; 42 int err;
43 43
44 if (tb[IFLA_ADDRESS]) {
45 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN)
46 return -EINVAL;
47 if (!is_valid_ether_addr(nla_data(tb[IFLA_ADDRESS])))
48 return -EADDRNOTAVAIL;
49 }
50
44 if (!data) 51 if (!data)
45 return -EINVAL; 52 return -EINVAL;
46 53