* [PATCH v1 net] rtnetlink: Don't ignore IFLA_TARGET_NETNSID when ifname is specified in rtnl_dellink().
@ 2024-07-27 0:19 Kuniyuki Iwashima
2024-07-27 1:21 ` Jakub Kicinski
2024-07-29 11:24 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Kuniyuki Iwashima @ 2024-07-27 0:19 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Jiri Pirko, Kuniyuki Iwashima, Kuniyuki Iwashima, netdev
The cited commit accidentally replaced tgt_net with net in rtnl_dellink().
As a result, IFLA_TARGET_NETNSID is ignored if the interface is specified
with IFLA_IFNAME or IFLA_ALT_IFNAME.
Let's pass tgt_net to rtnl_dev_get().
Fixes: cc6090e985d7 ("net: rtnetlink: introduce helper to get net_device instance by ifname")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
---
net/core/rtnetlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 87e67194f240..73fd7f543fd0 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -3288,7 +3288,7 @@ static int rtnl_dellink(struct sk_buff *skb, struct nlmsghdr *nlh,
if (ifm->ifi_index > 0)
dev = __dev_get_by_index(tgt_net, ifm->ifi_index);
else if (tb[IFLA_IFNAME] || tb[IFLA_ALT_IFNAME])
- dev = rtnl_dev_get(net, tb);
+ dev = rtnl_dev_get(tgt_net, tb);
else if (tb[IFLA_GROUP])
err = rtnl_group_dellink(tgt_net, nla_get_u32(tb[IFLA_GROUP]));
else
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 net] rtnetlink: Don't ignore IFLA_TARGET_NETNSID when ifname is specified in rtnl_dellink().
2024-07-27 0:19 [PATCH v1 net] rtnetlink: Don't ignore IFLA_TARGET_NETNSID when ifname is specified in rtnl_dellink() Kuniyuki Iwashima
@ 2024-07-27 1:21 ` Jakub Kicinski
2024-07-29 11:24 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2024-07-27 1:21 UTC (permalink / raw)
To: Kuniyuki Iwashima
Cc: David S. Miller, Eric Dumazet, Paolo Abeni, Jiri Pirko,
Kuniyuki Iwashima, netdev
On Fri, 26 Jul 2024 17:19:53 -0700 Kuniyuki Iwashima wrote:
> The cited commit accidentally replaced tgt_net with net in rtnl_dellink().
>
> As a result, IFLA_TARGET_NETNSID is ignored if the interface is specified
> with IFLA_IFNAME or IFLA_ALT_IFNAME.
>
> Let's pass tgt_net to rtnl_dev_get().
>
> Fixes: cc6090e985d7 ("net: rtnetlink: introduce helper to get net_device instance by ifname")
> Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 net] rtnetlink: Don't ignore IFLA_TARGET_NETNSID when ifname is specified in rtnl_dellink().
2024-07-27 0:19 [PATCH v1 net] rtnetlink: Don't ignore IFLA_TARGET_NETNSID when ifname is specified in rtnl_dellink() Kuniyuki Iwashima
2024-07-27 1:21 ` Jakub Kicinski
@ 2024-07-29 11:24 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-07-29 11:24 UTC (permalink / raw)
To: Kuniyuki Iwashima; +Cc: davem, edumazet, kuba, pabeni, jiri, kuni1840, netdev
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Fri, 26 Jul 2024 17:19:53 -0700 you wrote:
> The cited commit accidentally replaced tgt_net with net in rtnl_dellink().
>
> As a result, IFLA_TARGET_NETNSID is ignored if the interface is specified
> with IFLA_IFNAME or IFLA_ALT_IFNAME.
>
> Let's pass tgt_net to rtnl_dev_get().
>
> [...]
Here is the summary with links:
- [v1,net] rtnetlink: Don't ignore IFLA_TARGET_NETNSID when ifname is specified in rtnl_dellink().
https://git.kernel.org/netdev/net/c/9415d375d852
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-29 11:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-27 0:19 [PATCH v1 net] rtnetlink: Don't ignore IFLA_TARGET_NETNSID when ifname is specified in rtnl_dellink() Kuniyuki Iwashima
2024-07-27 1:21 ` Jakub Kicinski
2024-07-29 11:24 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).