]> git.baikalelectronics.ru Git - kernel.git/commit
net: Support specifying the network namespace upon device creation.
authorEric W. Biederman <ebiederm@aristanetworks.com>
Sun, 8 Nov 2009 08:53:51 +0000 (00:53 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Nov 2009 08:53:51 +0000 (00:53 -0800)
commit79f6ecd7b26142eefbdb5626973842d14479e442
treee9d7a41872f84c1395e21915e5f92c05ab872e69
parentbd8051fe00c4fae0790da8475c90d6b211f99bd8
net: Support specifying the network namespace upon device creation.

There is no good reason to not support userspace specifying the
network namespace during device creation, and it makes it easier
to create a network device and pass it to a child network namespace
with a well known name.

We have to be careful to ensure that the target network namespace
for the new device exists through the life of the call.  To keep
that logic clear I have factored out the network namespace grabbing
logic into rtnl_link_get_net.

In addtion we need to continue to pass the source network namespace
to the rtnl_link_ops.newlink method so that we can find the base
device source network namespace.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
drivers/net/can/dev.c
drivers/net/macvlan.c
drivers/net/veth.c
include/net/rtnetlink.h
net/8021q/vlan_netlink.c
net/core/rtnetlink.c
net/ipv4/ip_gre.c