]> git.ipfire.org Git - thirdparty/iproute2.git/commit
iplink: add support of IFLA_LINK_NETNSID attribute
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Tue, 17 Feb 2015 16:30:38 +0000 (17:30 +0100)
committerStephen Hemminger <shemming@brocade.com>
Sun, 22 Feb 2015 00:54:53 +0000 (16:54 -0800)
commitccdcbf35f120c754660b3b3f48fa67cc950a6407
tree6c6f4614fbee81cb264e853105baf76187d8a584
parentd182ee1307c7a83b581d8f6d473bbce2004420c0
iplink: add support of IFLA_LINK_NETNSID attribute

This new attribute is now advertised by the kernel for x-netns interfaces.
It's also possible to set it when an interface is created (and thus creating a
x-netns interface with one single message).

Example:
 $ ip netns add foo
 $ ip netns add bar
 $ ip -n foo netns set bar 15
 $ ip -n foo link add ipip1 link-netnsid 15 type ipip remote 10.16.0.121 local 10.16.0.249
 $ ip -n foo link ls ipip1
 3: ipip1@NONE: <POINTOPOINT,NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default
     link/ipip 10.16.0.249 peer 10.16.0.121 link-netnsid 15

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
ip/ipaddress.c
ip/iplink.c