Skip to content

iplink: Fix link-netns handling

Xiao Liang netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v12 patches 0 repliesSuperseded

Changes in v2 from the cover letter

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

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ip: Move of set_netnsid_from_name() to namespace.cinclude/namespace.h ip/ip_common.h ip/iplink.c +2 more+35 -300 replies
2/2iplink: Fix link-netns id and link ifindexip/iplink.c+118 -253 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchNicolas Dichtel
1/2
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 iproute2 0/2] iplink: Fix link-netns handling

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(-)
Signature · 1 line
2.47.0