netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2 0/2] iplink: Fix link-netns handling
@ 2024-09-26  8:43 Xiao Liang
  2024-09-26  8:43 ` [PATCH iproute2 1/2] ip: Move of set_netnsid_from_name() to namespace.c Xiao Liang
  2024-09-26  8:43 ` [PATCH iproute2 2/2] iplink: Fix link-netns id and link ifindex Xiao Liang
  0 siblings, 2 replies; 3+ messages in thread
From: Xiao Liang @ 2024-09-26  8:43 UTC (permalink / raw)
  To: Stephen Hemminger, netdev

When handling something like:

    # ip -n ns1 link add netns ns2 link-netns ns3 link eth1 eth1.100 type vlan id 100

should lookup eth1 in ns3 and set IFLA_LINK_NETNSID to the id of ns3 from ns2.
But currently ip-link tries to find eth1 in ns1 and failes. This series fixes
it.

Xiao Liang (2):
  ip: Move of set_netnsid_from_name() to namespace.c
  iplink: Fix link-netns id and link ifindex

 include/namespace.h |   2 +
 ip/ip_common.h      |   2 -
 ip/iplink.c         | 143 ++++++++++++++++++++++++++++++++++++--------
 ip/ipnetns.c        |  28 +--------
 lib/namespace.c     |  27 +++++++++
 5 files changed, 151 insertions(+), 51 deletions(-)

-- 
2.46.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-26  8:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26  8:43 [PATCH iproute2 0/2] iplink: Fix link-netns handling Xiao Liang
2024-09-26  8:43 ` [PATCH iproute2 1/2] ip: Move of set_netnsid_from_name() to namespace.c Xiao Liang
2024-09-26  8:43 ` [PATCH iproute2 2/2] iplink: Fix link-netns id and link ifindex Xiao Liang

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).