]> git.proxmox.com Git - mirror_iproute2.git/commit
netns: add subcommand to attach an existing network namespace
authorMatteo Croce <mcroce@redhat.com>
Tue, 29 Jan 2019 15:01:15 +0000 (16:01 +0100)
committerDavid Ahern <dsahern@gmail.com>
Wed, 30 Jan 2019 02:18:03 +0000 (18:18 -0800)
commite3dbcb2a12ab1bda3de6f9f61f4dfca182ec8a4c
tree4866284bf8f61bfa2620400ef9dcfa4fa09dcf31
parent6f1940da8ec18288560579c8114efb32fc2425f0
netns: add subcommand to attach an existing network namespace

ip tracks namespaces with dummy files in /var/run/netns/, but can't see
namespaces created with other tools.
Creating the dummy file and bind mounting the correct procfs entry will
make ip aware of that namespace.
Add an ip netns subcommand to automate this task.

Signed-off-by: Matteo Croce <mcroce@redhat.com>
Reviewed-by: Andrea Claudi <aclaudi@redhat.com>
Tested-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
ip/ipnetns.c
man/man8/ip-netns.8