Skip to content

Commit cb2911f

Browse files
haiyangzdavem330
authored andcommitted
hv_netvsc: Fix VF register on vlan devices
Added a condition to avoid vlan devices with same MAC registering as VF. Signed-off-by: Haiyang Zhang <[email protected]> Reviewed-by: K. Y. Srinivasan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent db54275 commit cb2911f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/hyperv/netvsc_drv.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,6 +1500,10 @@ static int netvsc_netdev_event(struct notifier_block *this,
15001500
{
15011501
struct net_device *event_dev = netdev_notifier_info_to_dev(ptr);
15021502

1503+
/* Avoid Vlan dev with same MAC registering as VF */
1504+
if (event_dev->priv_flags & IFF_802_1Q_VLAN)
1505+
return NOTIFY_DONE;
1506+
15031507
switch (event) {
15041508
case NETDEV_REGISTER:
15051509
return netvsc_register_vf(event_dev);

0 commit comments

Comments
 (0)