net: introduce IFF_UNICAST_FLT private flag
[deliverable/linux.git] / net / core / dev.c
index a8d91a5dd9094afaf4346bbf8dee55aad7b57447..6eb03fdaf07580f215e6084e0534c81d202c77e8 100644 (file)
@@ -4522,9 +4522,7 @@ void __dev_set_rx_mode(struct net_device *dev)
        if (!netif_device_present(dev))
                return;
 
-       if (ops->ndo_set_rx_mode)
-               ops->ndo_set_rx_mode(dev);
-       else {
+       if (!(dev->priv_flags & IFF_UNICAST_FLT)) {
                /* Unicast addresses changes may only happen under the rtnl,
                 * therefore calling __dev_set_promiscuity here is safe.
                 */
@@ -4535,10 +4533,12 @@ void __dev_set_rx_mode(struct net_device *dev)
                        __dev_set_promiscuity(dev, -1);
                        dev->uc_promisc = false;
                }
-
-               if (ops->ndo_set_multicast_list)
-                       ops->ndo_set_multicast_list(dev);
        }
+
+       if (ops->ndo_set_rx_mode)
+               ops->ndo_set_rx_mode(dev);
+       else if (ops->ndo_set_multicast_list)
+               ops->ndo_set_multicast_list(dev);
 }
 
 void dev_set_rx_mode(struct net_device *dev)
This page took 0.03884 seconds and 5 git commands to generate.