summaryrefslogtreecommitdiff
path: root/net/8021q/vlan_netlink.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2013-04-19 06:04:29 +0400
committerDavid S. Miller <davem@davemloft.net>2013-04-19 22:45:27 +0400
commit1fd9b1fc310314911f66d2f14a8e4f0ef37bf47b (patch)
tree20422146c46fb38a5cdd0d14e671a0793c3389b4 /net/8021q/vlan_netlink.c
parent80d5c3689b886308247da295a228a54df49a44f6 (diff)
downloadlinux-1fd9b1fc310314911f66d2f14a8e4f0ef37bf47b.tar.xz
net: vlan: prepare for 802.1ad support
Make the encapsulation protocol value a property of VLAN devices and change the device lookup functions to take the protocol value into account. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan_netlink.c')
-rw-r--r--net/8021q/vlan_netlink.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c
index 1789658b7cd7..a1a956ab39a5 100644
--- a/net/8021q/vlan_netlink.c
+++ b/net/8021q/vlan_netlink.c
@@ -118,11 +118,12 @@ static int vlan_newlink(struct net *src_net, struct net_device *dev,
if (!real_dev)
return -ENODEV;
- vlan->vlan_id = nla_get_u16(data[IFLA_VLAN_ID]);
- vlan->real_dev = real_dev;
- vlan->flags = VLAN_FLAG_REORDER_HDR;
+ vlan->vlan_proto = htons(ETH_P_8021Q);
+ vlan->vlan_id = nla_get_u16(data[IFLA_VLAN_ID]);
+ vlan->real_dev = real_dev;
+ vlan->flags = VLAN_FLAG_REORDER_HDR;
- err = vlan_check_real_dev(real_dev, vlan->vlan_id);
+ err = vlan_check_real_dev(real_dev, vlan->vlan_proto, vlan->vlan_id);
if (err < 0)
return err;