netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xiao Liang <shaw.leon@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>, netdev@vger.kernel.org
Subject: [PATCH v2 iproute2 0/2] iplink: Fix link-netns handling
Date: Fri, 11 Oct 2024 16:01:07 +0800	[thread overview]
Message-ID: <20241011080111.387028-1-shaw.leon@gmail.com> (raw)

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.

---

v2:
- Rebase in regard to
    57daf8ff8c6c ("iplink: fix fd leak when playing with netns")


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, 150 insertions(+), 52 deletions(-)

-- 
2.47.0


             reply	other threads:[~2024-10-11  8:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11  8:01 Xiao Liang [this message]
2024-10-11  8:01 ` [PATCH v2 iproute2 1/2] ip: Move of set_netnsid_from_name() to namespace.c Xiao Liang
2024-10-11  8:01 ` [PATCH v2 iproute2 2/2] iplink: Fix link-netns id and link ifindex Xiao Liang
2024-10-15  7:45   ` Nicolas Dichtel
2024-10-15  9:06     ` Xiao Liang
2024-10-15 14:27       ` Nicolas Dichtel
2024-10-17 19:20 ` [PATCH v2 iproute2 0/2] iplink: Fix link-netns handling patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241011080111.387028-1-shaw.leon@gmail.com \
    --to=shaw.leon@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).