diff options
author | Xiao Liang <shaw.leon@gmail.com> | 2025-02-19 15:50:30 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-02-22 02:28:02 +0300 |
commit | 3533717581dd72c9559b508e0feaede426d825aa (patch) | |
tree | 49c880ef3eb474f7a692ed0acff5a1464924c520 /tools/testing/selftests/net/lib/py/netns.py | |
parent | cf517ac16ad96f3953d65ea198c0b310a1ffa14f (diff) | |
download | linux-3533717581dd72c9559b508e0feaede426d825aa.tar.xz |
ieee802154: 6lowpan: Validate link netns in newlink() of rtnl_link_ops
Device denoted by IFLA_LINK is in link_net (IFLA_LINK_NETNSID) or
source netns by design, but 6lowpan uses dev_net.
Note dev->netns_local is set to true and currently link_net is
implemented via a netns change. These together effectively reject
IFLA_LINK_NETNSID.
This patch adds a validation to ensure link_net is either NULL or
identical to dev_net. Thus it would be fine to continue using dev_net
when rtnetlink core begins to create devices directly in target netns.
Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250219125039.18024-5-shaw.leon@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/netns.py')
0 files changed, 0 insertions, 0 deletions