]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: ip_tunnel: Use link netns in newlink() of rtnl_link_ops
authorXiao Liang <shaw.leon@gmail.com>
Wed, 19 Feb 2025 12:50:32 +0000 (20:50 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Feb 2025 23:28:02 +0000 (15:28 -0800)
commiteacb1160536e097ba1eb910a1b212d1032d2e9c6
tree4af066d294f34002f7ca5a39c05047623490d165
parent9e17b2a1a097f3f3e8973722ccd3770eef193edd
net: ip_tunnel: Use link netns in newlink() of rtnl_link_ops

When link_net is set, use it as link netns instead of dev_net(). This
prepares for rtnetlink core to create device in target netns directly,
in which case the two namespaces may be different.

Convert common ip_tunnel_newlink() to accept an extra link netns
argument.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250219125039.18024-7-shaw.leon@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/ip_tunnels.h
net/ipv4/ip_gre.c
net/ipv4/ip_tunnel.c
net/ipv4/ip_vti.c
net/ipv4/ipip.c