This patch enables to dump/get nsid from a netns into another netns. Example: $ ./test.sh + ip netns add foo + ip netns add bar + touch /var/run/netns/init_net + mount --bind /proc/1/ns/net /var/run/netns/init_net + ip netns set init_net 11 + ip netns set foo 12 + ip netns set bar 13 + ip netns init_net (id: 11) bar (id: 13) foo (id: 12) + ip -n foo netns set init_net 21 + ip -n foo netns set foo 22 + ip -n foo netns set bar 23 + ip -n foo netns init_net (id: 21) bar (id: 23) foo (id: 22) + ip -n bar netns set init_net 31 + ip -n bar netns set foo 32 + ip -n bar netns set bar 33 + ip -n bar netns init_net (id: 31) bar (id: 33) foo (id: 32) + ip netns list-id target-nsid 12 nsid 21 current-nsid 11 (iproute2 netns name: init_net) nsid 22 current-nsid 12 (iproute2 netns name: foo) nsid 23 current-nsid 13 (iproute2 netns name: bar) + ip -n foo netns list-id target-nsid 21 nsid 11 current-nsid 21 (iproute2 netns name: init_net) nsid 12 current-nsid 22 (iproute2 netns name: foo) nsid 13 current-nsid 23 (iproute2 netns name: bar) + ip -n bar netns list-id target-nsid 33 nsid 32 nsid 32 current-nsid 32 (iproute2 netns name: foo) + ip -n bar netns list-id target-nsid 31 nsid 32 nsid 12 current-nsid 32 (iproute2 netns name: foo) + ip netns list-id nsid 13 nsid 13 (iproute2 netns name: bar) CC: Petr Oros <poros@redhat.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Tested-by: Petr Oros <poros@redhat.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> |
||
|---|---|---|
| bash-completion | ||
| bridge | ||
| devlink | ||
| doc/actions | ||
| etc/iproute2 | ||
| examples | ||
| genl | ||
| include | ||
| ip | ||
| lib | ||
| man | ||
| misc | ||
| netem | ||
| rdma | ||
| schema | ||
| tc | ||
| testsuite | ||
| tipc | ||
| .clang-format | ||
| .gitignore | ||
| .mailmap | ||
| COPYING | ||
| Makefile | ||
| README | ||
| README.devel | ||
| README.distribution | ||
| README.iproute2+tc | ||
| README.lnstat | ||
| configure | ||
README
This is a set of utilities for Linux networking.
Information:
https://wiki.linuxfoundation.org/networking/iproute2
Download:
http://www.kernel.org/pub/linux/utils/net/iproute2/
Stable version repository:
git://git.kernel.org/pub/scm/network/iproute2/iproute2.git
Development repository:
git://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git
How to compile this.
--------------------
1. libdbm
arpd needs to have the berkeleydb development libraries. For Debian
users this is the package with a name like libdbX.X-dev.
DBM_INCLUDE points to the directory with db_185.h which
is the include file used by arpd to get to the old format Berkeley
database routines. Often this is in the db-devel package.
2. make
The makefile will automatically build a config.mk file which
contains definitions of libraries that may or may not be available
on the system such as: ATM, ELF, MNL, and SELINUX.
3. To make documentation, cd to doc/ directory , then
look at start of Makefile and set correct values for
PAGESIZE=a4 , ie: a4 , letter ... (string)
PAGESPERPAGE=2 , ie: 1 , 2 ... (numeric)
and make there. It assumes, that latex, dvips and psnup
are in your path.
4. This package includes matching sanitized kernel headers because
the build environment may not have up to date versions. See Makefile
if you have special requirements and need to point at different
kernel include files.
Stephen Hemminger
stephen@networkplumber.org
Alexey Kuznetsov
kuznet@ms2.inr.ac.ru