Skip to contentSkip to conversation

hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf

PATCH Superseded Li Tian 4 participants 9 messages Jul 10, 2025 – Jul 11, 2025

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Li Tian

author
#0 lore raw

PATCH 1/1 hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf

The use of the IFF_SLAVE flag was replaced by IFF_NO_ADDRCONF to prevent ipv6 addrconf.

Commit 8a321cf7becc6c065ae595b837b826a2a81036b9
("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")

This new flag change was not made to hv_netvsc resulting in the VF being assinged an IPv6.

---
 drivers/net/hyperv/netvsc_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/hyperv/netvsc_drv.c +2 -2
index c41a025c66f0..a31521f00681 100644
@@ -2317,8 +2317,8 @@ static int netvsc_prepare_bonding(struct net_device *vf_netdev)
 	if (!ndev)
 		return NOTIFY_DONE;
 
-	/* set slave flag before open to prevent IPv6 addrconf */
-	vf_netdev->flags |= IFF_SLAVE;
+	/* Set no addrconf flag before open to prevent IPv6 addrconf */
+	vf_netdev->priv_flags |= IFF_NO_ADDRCONF;
 	return NOTIFY_DONE;
 }
 
Signature · 1 line
2.50.0
maintainer
#1 lore raw
Quoted 34 lines

-----Original Message-----
From: Li Tian <[email protected]>
Sent: Wednesday, July 9, 2025 10:46 PM
To: [email protected]; [email protected]
Cc: [email protected]; Haiyang Zhang <[email protected]>; Dexuan Cui <[email protected]>
Subject: [EXTERNAL] [PATCH] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf

The use of the IFF_SLAVE flag was replaced by IFF_NO_ADDRCONF to prevent ipv6 addrconf.

Commit 8a321cf7becc6c065ae595b837b826a2a81036b9
("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")

This new flag change was not made to hv_netvsc resulting in the VF being assinged an IPv6.

---
 drivers/net/hyperv/netvsc_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/hyperv/netvsc_drv.c +0 -0
index c41a025c66f0..a31521f00681 100644

drivers/net/hyperv/netvsc_drv.c static int netvsc_prepare_bonding(struct net_device · line 2322

Quoted 8 lines
drivers/net/hyperv/netvsc_drv.c +2 -2
@@ -2317,8 +2317,8 @@ static int netvsc_prepare_bonding(struct net_device
 *vf_netdev)
 	if (!ndev)
 		return NOTIFY_DONE;
 
-	/* set slave flag before open to prevent IPv6 addrconf */
-	vf_netdev->flags |= IFF_SLAVE;
+	/* Set no addrconf flag before open to prevent IPv6 addrconf */
+	vf_netdev->priv_flags |= IFF_NO_ADDRCONF;

The IFF_SLAVE flag is still needed for our user mode, and udev rules to work. So please keep it. (you may update the comment though).

cc: Long Li <[email protected]>
@Long Li

Thanks,
- Haiyang

maintainer
#2 lore raw
Quoted 60 lines

-----Original Message-----
From: Haiyang Zhang <[email protected]>
Sent: Thursday, July 10, 2025 4:24 PM
To: Li Tian <[email protected]>; [email protected]; linux- [email protected]; Long Li <[email protected]>
Cc: [email protected]; Dexuan Cui <[email protected]>
Subject: RE: [EXTERNAL] [PATCH] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf

Quoted 5 lines

-----Original Message-----
From: Li Tian <[email protected]>
Sent: Wednesday, July 9, 2025 10:46 PM
To: [email protected]; [email protected]
Cc: [email protected]; Haiyang Zhang

<[email protected]>;

drivers/net/hyperv/netvsc_drv.c static int netvsc_prepare_bonding(struct

Quoted 27 lines

Dexuan Cui <[email protected]>
Subject: [EXTERNAL] [PATCH] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf

The use of the IFF_SLAVE flag was replaced by IFF_NO_ADDRCONF to prevent ipv6 addrconf.

Commit 8a321cf7becc6c065ae595b837b826a2a81036b9
("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")

This new flag change was not made to hv_netvsc resulting in the VF being assinged an IPv6.

---
 drivers/net/hyperv/netvsc_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/hyperv/netvsc_drv.c +0 -0
index c41a025c66f0..a31521f00681 100644
@@ -2317,8 +2317,8 @@ static int netvsc_prepare_bonding(struct

net_device

drivers/net/hyperv/netvsc_drv.c static int netvsc_prepare_bonding(struct net_device *vf_netdev) · line 2321

Quoted 8 lines
drivers/net/hyperv/netvsc_drv.c +2 -2
 *vf_netdev)
 	if (!ndev)
 		return NOTIFY_DONE;
 
-	/* set slave flag before open to prevent IPv6 addrconf */
-	vf_netdev->flags |= IFF_SLAVE;
+	/* Set no addrconf flag before open to prevent IPv6 addrconf */
+	vf_netdev->priv_flags |= IFF_NO_ADDRCONF;

The IFF_SLAVE flag is still needed for our user mode, and udev rules to work.
So please keep it. (you may update the comment though).

Quoted 3 lines

cc: Long Li <[email protected]>
@Long Li

I mean, adding it's ok to add IFF_NO_ADDRCONF. And, please keep IFF_SLAVE too.

- Haiyang

author
#3 lore raw

PATCH v2 1/1 hv_netvsc: Add IFF_NO_ADDRCONF to VF priv_flags before

In reply to Li Tian

Add an additional flag IFF_NO_ADDRCONF to prevent ipv6 addrconf.

Commit 8a321cf7becc6c065ae595b837b826a2a81036b9
("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")

This new flag change was not made to hv_netvsc resulting in the VF being assinged an IPv6.

---
 drivers/net/hyperv/netvsc_drv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +4 -1
index c41a025c66f0..8be9bce66a4e 100644
@@ -2317,8 +2317,11 @@ static int netvsc_prepare_bonding(struct net_device *vf_netdev)
 	if (!ndev)
 		return NOTIFY_DONE;
 
-	/* set slave flag before open to prevent IPv6 addrconf */
+	/* Set slave flag and no addrconf flag before open
+	 * to prevent IPv6 addrconf.
+	 */
 	vf_netdev->flags |= IFF_SLAVE;
+	vf_netdev->priv_flags |= IFF_NO_ADDRCONF;
 	return NOTIFY_DONE;
 }
 
Signature · 1 line
2.50.0
#4 lore raw

Re: [PATCH v2] hv_netvsc: Add IFF_NO_ADDRCONF to VF priv_flags before

Quoted 22 lines · On Fri, 11 Jul 2025 11:39:58 +0800 Li Tian <[email protected]> wrote:

Add an additional flag IFF_NO_ADDRCONF to prevent ipv6 addrconf.

Commit 8a321cf7becc6c065ae595b837b826a2a81036b9
("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")

This new flag change was not made to hv_netvsc resulting in the VF being assinged an IPv6.

---
 drivers/net/hyperv/netvsc_drv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +0 -0
index c41a025c66f0..8be9bce66a4e 100644
@@ -2317,8 +2317,11 @@ static int netvsc_prepare_bonding(struct net_device *vf_netdev)
 	if (!ndev)
 		return NOTIFY_DONE;

drivers/net/hyperv/netvsc_drv.c static int netvsc_prepare_bonding(struct net_device *vf_netdev) · line 2327

Quoted 10 lines
drivers/net/hyperv/netvsc_drv.c +4 -1
 
-	/* set slave flag before open to prevent IPv6 addrconf */
+	/* Set slave flag and no addrconf flag before open
+	 * to prevent IPv6 addrconf.
+	 */
 	vf_netdev->flags |= IFF_SLAVE;
+	vf_netdev->priv_flags |= IFF_NO_ADDRCONF;
 	return NOTIFY_DONE;
 }
 

Thanks this worked originally but got broken, please add:

Fixes 8a321cf7becc ("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")

Looks like team and failover have the same problem.

author
#5 lore raw

PATCH v2 1/1 hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf

In reply to Li Tian

Set an additional flag IFF_NO_ADDRCONF to prevent ipv6 addrconf.

Commit 8a321cf7becc6c065ae595b837b826a2a81036b9
("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")

This new flag change was not made to hv_netvsc resulting in the VF being assinged an IPv6.

---
 drivers/net/hyperv/netvsc_drv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +4 -1
index c41a025c66f0..8be9bce66a4e 100644
@@ -2317,8 +2317,11 @@ static int netvsc_prepare_bonding(struct net_device *vf_netdev)
 	if (!ndev)
 		return NOTIFY_DONE;
 
-	/* set slave flag before open to prevent IPv6 addrconf */
+	/* Set slave flag and no addrconf flag before open
+	 * to prevent IPv6 addrconf.
+	 */
 	vf_netdev->flags |= IFF_SLAVE;
+	vf_netdev->priv_flags |= IFF_NO_ADDRCONF;
 	return NOTIFY_DONE;
 }
 
Signature · 1 line
2.50.0
#6 lore raw
Quoted 4 lines · On Fri, 11 Jul 2025 12:06:23 +0800 Li Tian <[email protected]> wrote:

Set an additional flag IFF_NO_ADDRCONF to prevent ipv6 addrconf.

Commit 8a321cf7becc6c065ae595b837b826a2a81036b9
("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")

Should be Fixes: tag since the reference commit caused the regression. Yes, it is a way to blame and track.

author
#7 lore raw

PATCH v2 1/1 hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf

In reply to Li Tian

Set an additional flag IFF_NO_ADDRCONF to prevent ipv6 addrconf.

Commit 8a321cf7becc6c065ae595b837b826a2a81036b9
("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")

This new flag change was not made to hv_netvsc resulting in the VF being assinged an IPv6.

Fixes 8a321cf7becc ("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")
---
 drivers/net/hyperv/netvsc_drv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +4 -1
index c41a025c66f0..8be9bce66a4e 100644
@@ -2317,8 +2317,11 @@ static int netvsc_prepare_bonding(struct net_device *vf_netdev)
 	if (!ndev)
 		return NOTIFY_DONE;
 
-	/* set slave flag before open to prevent IPv6 addrconf */
+	/* Set slave flag and no addrconf flag before open
+	 * to prevent IPv6 addrconf.
+	 */
 	vf_netdev->flags |= IFF_SLAVE;
+	vf_netdev->priv_flags |= IFF_NO_ADDRCONF;
 	return NOTIFY_DONE;
 }
 
Signature · 1 line
2.50.0
maintainer
#8 lore raw
Quoted 2 lines · On Fri, 11 Jul 2025 12:17:00 +0800 Li Tian wrote:

Commit 8a321cf7becc6c065ae595b837b826a2a81036b9
("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")

Please trim the hash to the same length as in the Fixes tag.

Quoted 8 lines

This new flag change was not made to hv_netvsc resulting in the VF being assinged an IPv6.

Fixes 8a321cf7becc ("net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf")

Please remove the empty lines between the Fixes tag, and the ...-by:
tags.

Please remember to increase the patch version between revisions.

Please don't post the new versions in reply to old versions.

Please don't post new versions within 24 of the previous one.

Please read:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html

Signature · 1 line
pw-bot: cr