]> rtime.felk.cvut.cz Git - socketcan-devel.git/commit
net: Support specifying the network namespace upon device creation.
authorwolf <wolf@030b6a49-0b11-0410-94ab-b0dab22257f2>
Sat, 21 Nov 2009 20:28:17 +0000 (20:28 +0000)
committerwolf <wolf@030b6a49-0b11-0410-94ab-b0dab22257f2>
Sat, 21 Nov 2009 20:28:17 +0000 (20:28 +0000)
commit03c4b6c2fa7364e020a883809475f28e71edb836
tree69440b228fa95509e11c52de65593de49bbaf836
parenta5f601fe64e4e29e424e698e8aa96799c34f973c
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.

From net-next-2.6 commit 81adee47dfb608df3ad0b91d230fb3cef75f0060
adapted for SVN trunk.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1085 030b6a49-0b11-0410-94ab-b0dab22257f2
kernel/2.6/drivers/net/can/dev.c