]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
hv_netvsc: Set VF priv_flags to IFF_NO_ADDRCONF before open to prevent IPv6 addrconf
authorLi Tian <litian@redhat.com>
Wed, 16 Jul 2025 00:26:05 +0000 (08:26 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jul 2025 06:53:19 +0000 (08:53 +0200)
[ Upstream commit d7501e076d859d2f381d57bd984ff6db13172727 ]

Set an additional flag IFF_NO_ADDRCONF to prevent ipv6 addrconf.

Commit under Fixes added a new flag change that 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")
Suggested-by: Cathy Avery <cavery@redhat.com>
Signed-off-by: Li Tian <litian@redhat.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/20250716002607.4927-1-litian@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/hyperv/netvsc_drv.c

index ce6ac26131b347c4735239720736240fe9440376..f33f9167ba6b6ee833ecf4bd7a96f6b622adb6a8 100644 (file)
@@ -2313,8 +2313,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;
 }