Skip to content

Switch network ns w/o 'netns exec' for iproute2 tools

Vadim Kochan netdev 2 versions – Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 2 repliesApplied
  2. v14 patches 7 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4lib: Add netns_switch func for change network namespaceinclude/namespace.h ip/ipnetns.c lib/Makefile +1 more+140 -1040 replies
2/4ip: Allow to easy change network namespaceip/ip.c man/man8/ip.8+28 -20 replies
3/4bridge: Allow to easy change network namespacebridge/Makefile bridge/bridge.c man/man8/bridge.8+32 -20 replies
4/4tc: Allow to easy change network namespaceman/man8/tc.8 tc/Makefile tc/tc.c+62 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH iproute2 v2 0/4] Switch network ns w/o 'netns exec' for iproute2 tools

From: Vadim Kochan <[email protected]>

This series adds new -n[etns] option to ip, tc & bridge tools which allows to easy and faster switch to specified network namespace. So instead of:

ip netns exec NETNS { ip | tc | bridge } OBJECT COMMAND

it will be possible do the same by:

{ ip | tc | bridge } -n[etns] NETNS OBJECT COMMAND

I skipped misc tools and will work on them later.

Vadim Kochan (4):
lib: Add netns_switch func for change network namespace
ip: Allow to easy change network namespace
bridge: Allow to easy change network namespace
tc: Allow to easy change network namespace

 bridge/Makefile     |   4 ++
 bridge/bridge.c     |   7 +++-
 include/namespace.h |  46 +++++++++++++++++++++++
 ip/ip.c             |   7 +++-
 ip/ipnetns.c        | 106 ++--------------------------------------------------
 lib/Makefile        |   6 ++-
 lib/namespace.c     |  86 ++++++++++++++++++++++++++++++++++++++++++
 man/man8/bridge.8   |  23 +++++++++++-
 man/man8/ip.8       |  23 +++++++++++-
 man/man8/tc.8       |  65 ++++++++++++++++++++++++--------
 tc/Makefile         |   5 +++
 tc/tc.c             |   8 +++-
 12 files changed, 262 insertions(+), 124 deletions(-)
 create mode 100644 include/namespace.h
 create mode 100644 lib/namespace.c
Signature · 1 line
2.1.3