]> git.baikalelectronics.ru Git - kernel.git/commit
tun: Grab the netns in open.
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 20 Jan 2009 11:01:48 +0000 (11:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jan 2009 00:00:45 +0000 (16:00 -0800)
commit8f39ff3427ed44cd76aa2b3dd626dad7f8ad9436
tree6363b239732a1ad8d9fd516993c8c6c093dc63a2
parent787928096e9c0eff1049aeaa8dbc7efeb2d70637
tun: Grab the netns in open.

Grabbing namespaces in open, and putting them in close always seems to
be the cleanest approach with the fewest surprises.

So now that we have tun_file so we have somepleace to put the network
namespace, let's grab the network namespace on file open and put on
file close.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c