]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/8021q/vlan_dev.c
vlan: Don't propagate flag changes on down interfaces.
[mirror_ubuntu-artful-kernel.git] / net / 8021q / vlan_dev.c
index 9d40a071d0382e7e893483066fa3bb5285fa8bc0..bc252862458385ef5d37367a643fcdf9ef5ad9af 100644 (file)
@@ -470,10 +470,12 @@ static void vlan_dev_change_rx_flags(struct net_device *dev, int change)
 {
        struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
 
-       if (change & IFF_ALLMULTI)
-               dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1);
-       if (change & IFF_PROMISC)
-               dev_set_promiscuity(real_dev, dev->flags & IFF_PROMISC ? 1 : -1);
+       if (dev->flags & IFF_UP) {
+               if (change & IFF_ALLMULTI)
+                       dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1);
+               if (change & IFF_PROMISC)
+                       dev_set_promiscuity(real_dev, dev->flags & IFF_PROMISC ? 1 : -1);
+       }
 }
 
 static void vlan_dev_set_rx_mode(struct net_device *vlan_dev)
@@ -610,7 +612,8 @@ static int vlan_ethtool_get_settings(struct net_device *dev,
                                     struct ethtool_cmd *cmd)
 {
        const struct vlan_dev_info *vlan = vlan_dev_info(dev);
-       return dev_ethtool_get_settings(vlan->real_dev, cmd);
+
+       return __ethtool_get_settings(vlan->real_dev, cmd);
 }
 
 static void vlan_ethtool_get_drvinfo(struct net_device *dev,
@@ -674,7 +677,6 @@ static const struct net_device_ops vlan_netdev_ops = {
        .ndo_validate_addr      = eth_validate_addr,
        .ndo_set_mac_address    = vlan_dev_set_mac_address,
        .ndo_set_rx_mode        = vlan_dev_set_rx_mode,
-       .ndo_set_multicast_list = vlan_dev_set_rx_mode,
        .ndo_change_rx_flags    = vlan_dev_change_rx_flags,
        .ndo_do_ioctl           = vlan_dev_ioctl,
        .ndo_neigh_setup        = vlan_dev_neigh_setup,