[VLAN]: Don't synchronize addresses while the vlan device is down
[cascardo/linux.git] / net / 8021q / vlan.c
index 3fe4fc8..0fadbc6 100644 (file)
@@ -636,6 +636,10 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
                        if (!vlandev)
                                continue;
 
+                       flgs = vlandev->flags;
+                       if (!(flgs & IFF_UP))
+                               continue;
+
                        vlan_sync_address(dev, vlandev);
                }
                break;
@@ -747,6 +751,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
                vlan_dev_set_ingress_priority(dev,
                                              args.u.skb_priority,
                                              args.vlan_qos);
+               err = 0;
                break;
 
        case SET_VLAN_EGRESS_PRIORITY_CMD: