Skip to contentSkip to conversation

hv_netvsc: Fix VF register on vlan devices

PATCH Applied Haiyang Zhang 2 participants 2 messages Jun 2, 2016 – Jun 3, 2016

Subsystems (3)
lore
Share & tools
lore

Haiyang Zhang

author maintainer
#0 lore raw

PATCH 1/1 hv_netvsc: Fix VF register on vlan devices

Added a condition to avoid vlan devices with same MAC registering as VF.

---
 drivers/net/hyperv/netvsc_drv.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/net/hyperv/netvsc_drv.c +4 -0
index 6a69b5c..5ac1267 100644
@@ -1500,6 +1500,10 @@ 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)
+		return NOTIFY_DONE;
+
 	switch (event) {
 	case NETDEV_REGISTER:
 		return netvsc_register_vf(event_dev);
Signature · 1 line
1.7.4.1