hv_netvsc: Fix VF register on bonding devices
authorHaiyang Zhang <haiyangz@microsoft.com>
Sat, 23 Jul 2016 01:14:50 +0000 (18:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jul 2016 18:19:22 +0000 (11:19 -0700)
Added a condition to avoid bonding devices with same MAC registering
as VF.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c

index 787a20235e5caa16063aecef89c3b6a335a1d628..41bd952cc28d37299562b2a9025e6767b39973c1 100644 (file)
@@ -1494,8 +1494,8 @@ static int netvsc_netdev_event(struct notifier_block *this,
 {
        struct net_device *event_dev = netdev_notifier_info_to_dev(ptr);
 
-       /* Avoid Vlan dev with same MAC registering as VF */
-       if (event_dev->priv_flags & IFF_802_1Q_VLAN)
+       /* Avoid Vlan, Bonding dev with same MAC registering as VF */
+       if (event_dev->priv_flags & (IFF_802_1Q_VLAN | IFF_BONDING))
                return NOTIFY_DONE;
 
        switch (event) {