aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan.c11
-rw-r--r--net/8021q/vlan_dev.c3
2 files changed, 10 insertions, 4 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 6567213959cb..032bf44eca5e 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -124,8 +124,8 @@ static void __exit vlan_cleanup_module(void)
124{ 124{
125 int i; 125 int i;
126 126
127 vlan_netlink_fini();
128 vlan_ioctl_set(NULL); 127 vlan_ioctl_set(NULL);
128 vlan_netlink_fini();
129 129
130 /* Un-register us from receiving netdevice events */ 130 /* Un-register us from receiving netdevice events */
131 unregister_netdevice_notifier(&vlan_notifier_block); 131 unregister_netdevice_notifier(&vlan_notifier_block);
@@ -323,6 +323,7 @@ static const struct header_ops vlan_header_ops = {
323static int vlan_dev_init(struct net_device *dev) 323static int vlan_dev_init(struct net_device *dev)
324{ 324{
325 struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev; 325 struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev;
326 int subclass = 0;
326 327
327 /* IFF_BROADCAST|IFF_MULTICAST; ??? */ 328 /* IFF_BROADCAST|IFF_MULTICAST; ??? */
328 dev->flags = real_dev->flags & ~IFF_UP; 329 dev->flags = real_dev->flags & ~IFF_UP;
@@ -349,7 +350,11 @@ static int vlan_dev_init(struct net_device *dev)
349 dev->hard_start_xmit = vlan_dev_hard_start_xmit; 350 dev->hard_start_xmit = vlan_dev_hard_start_xmit;
350 } 351 }
351 352
352 lockdep_set_class(&dev->_xmit_lock, &vlan_netdev_xmit_lock_key); 353 if (real_dev->priv_flags & IFF_802_1Q_VLAN)
354 subclass = 1;
355
356 lockdep_set_class_and_subclass(&dev->_xmit_lock,
357 &vlan_netdev_xmit_lock_key, subclass);
353 return 0; 358 return 0;
354} 359}
355 360
@@ -776,7 +781,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
776 case SET_VLAN_NAME_TYPE_CMD: 781 case SET_VLAN_NAME_TYPE_CMD:
777 err = -EPERM; 782 err = -EPERM;
778 if (!capable(CAP_NET_ADMIN)) 783 if (!capable(CAP_NET_ADMIN))
779 return -EPERM; 784 break;
780 if ((args.u.name_type >= 0) && 785 if ((args.u.name_type >= 0) &&
781 (args.u.name_type < VLAN_NAME_TYPE_HIGHEST)) { 786 (args.u.name_type < VLAN_NAME_TYPE_HIGHEST)) {
782 vlan_name_type = args.u.name_type; 787 vlan_name_type = args.u.name_type;
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 7a36878241da..4f99bb86af5c 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -462,7 +462,8 @@ int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
462 * OTHER THINGS LIKE FDDI/TokenRing/802.3 SNAPs... 462 * OTHER THINGS LIKE FDDI/TokenRing/802.3 SNAPs...
463 */ 463 */
464 464
465 if (veth->h_vlan_proto != htons(ETH_P_8021Q)) { 465 if (veth->h_vlan_proto != htons(ETH_P_8021Q) ||
466 VLAN_DEV_INFO(dev)->flags & VLAN_FLAG_REORDER_HDR) {
466 int orig_headroom = skb_headroom(skb); 467 int orig_headroom = skb_headroom(skb);
467 unsigned short veth_TCI; 468 unsigned short veth_TCI;
468 469