]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rtnetlink: Try the outer netns attribute in rtnl_get_peer_net().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 16 Dec 2024 11:04:32 +0000 (20:04 +0900)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Dec 2024 01:54:18 +0000 (17:54 -0800)
commit954a2b40719a21e763a1bba2f0da92347e058fce
treee14c61508d70d2b704a59c3b71f277afa8d12b1a
parentb9b8301d369b4c876de5255dbf067b19ba88ac71
rtnetlink: Try the outer netns attribute in rtnl_get_peer_net().

Xiao Liang reported that the cited commit changed netns handling
in newlink() of netkit, veth, and vxcan.

Before the patch, if we don't find a netns attribute in the peer
device attributes, we tried to find another netns attribute in
the outer netlink attributes by passing it to rtnl_link_get_net().

Let's restore the original behaviour.

Fixes: 48327566769a ("rtnetlink: fix double call of rtnl_link_get_net_ifla()")
Reported-by: Xiao Liang <shaw.leon@gmail.com>
Closes: https://lore.kernel.org/netdev/CABAhCORBVVU8P6AHcEkENMj+gD2d3ce9t=A_o48E0yOQp8_wUQ@mail.gmail.com/#t
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Tested-by: Xiao Liang <shaw.leon@gmail.com>
Link: https://patch.msgid.link/20241216110432.51488-1-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/rtnetlink.c