Thread (9 messages) 9 messages, 4 authors, 2025-07-11

RE: [EXTERNAL] [PATCH] hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf

From: Haiyang Zhang <haiyangz@microsoft.com>
Date: 2025-07-10 20:24:29
Also in: linux-hyperv, lkml

quoted hunk ↗ jump to hunk
-----Original Message-----
From: Li Tian <redacted>
Sent: Wednesday, July 9, 2025 10:46 PM
To: netdev@vger.kernel.org; linux-hyperv@vger.kernel.org
Cc: linux-kernel@vger.kernel.org; Haiyang Zhang <haiyangz@microsoft.com>;
Dexuan Cui [off-list ref]
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.

Suggested-by: Cathy Avery <redacted>

Signed-off-by: Li Tian <redacted>
---
 drivers/net/hyperv/netvsc_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c
b/drivers/net/hyperv/netvsc_drv.c
index c41a025c66f0..a31521f00681 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -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 <longli@microsoft.com>
@Long Li

Thanks,
- Haiyang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help