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

net: Use link/peer netns in newlink() of rtnl_link_ops



Add two helper functions - rtnl_newlink_link_net() and
rtnl_newlink_peer_net() for netns fallback logic. Peer netns falls back
to link netns, and link netns falls back to source netns.

Convert the use of params->net in netdevice drivers to one of the helper
functions for clarity.

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-4-shaw.leon@gmail.com


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