Commit db014522 authored by Xiao Liang's avatar Xiao Liang Committed by Jakub Kicinski
Browse files

net: ipv6: Init tunnel link-netns before registering dev



Currently some IPv6 tunnel drivers set tnl->net to dev_net(dev) in
ndo_init(), which is called in register_netdevice(). However, it lacks
the context of link-netns when we enable cross-net tunnels at device
registration time.

Let's move the init of tunnel link-netns before register_netdevice().

ip6_gre has already initialized netns, so just remove the redundant
assignment.

Signed-off-by: default avatarXiao Liang <shaw.leon@gmail.com>
Reviewed-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250219125039.18024-8-shaw.leon@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent eacb1160
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment