]> git.baikalelectronics.ru Git - kernel.git/commit
netns: add rtnl cmd to add and get peer netns ids
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Thu, 15 Jan 2015 14:11:15 +0000 (15:11 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Jan 2015 19:21:18 +0000 (14:21 -0500)
commit6cbd07ae6353fe260472b87d90af55f16ddf44c6
tree2c4ba6eda5392449a2c9019aafd061324e242dbc
parentf964226f556f99471809b3453a199c4d6c431e11
netns: add rtnl cmd to add and get peer netns ids

With this patch, a user can define an id for a peer netns by providing a FD or a
PID. These ids are local to the netns where it is added (ie valid only into this
netns).

The main function (ie the one exported to other module), peernet2id(), allows to
get the id of a peer netns. If no id has been assigned by the user, this
function allocates one.

These ids will be used in netlink messages to point to a peer netns, for example
in case of a x-netns interface.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
MAINTAINERS
include/net/net_namespace.h
include/uapi/linux/Kbuild
include/uapi/linux/net_namespace.h [new file with mode: 0644]
include/uapi/linux/rtnetlink.h
net/core/net_namespace.c