l2tp: create tunnel sockets in the right namespace
authorTom Parkin <tparkin@katalix.com>
Thu, 31 Jan 2013 23:43:03 +0000 (23:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Feb 2013 19:20:30 +0000 (14:20 -0500)
commit167eb17e0b178549f5e19036b16b6d6e35856b67
tree0f8866d325659e6aef8e10506d4e316335d1e54c
parentcbb95e0ca92869cc94a1c5e5ac58395afbbda26e
l2tp: create tunnel sockets in the right namespace

When creating unmanaged tunnel sockets we should honour the network namespace
passed to l2tp_tunnel_create.  Furthermore, unmanaged tunnel sockets should
not hold a reference to the network namespace lest they accidentally keep
alive a namespace which should otherwise have been released.

Unmanaged tunnel sockets now drop their namespace reference via sk_change_net,
and are released in a new pernet exit callback, l2tp_exit_net.

Signed-off-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_core.c