]> git.baikalelectronics.ru Git - kernel.git/commit
l2tp: prevent tunnel creation on netns mismatch
authorTom Parkin <tparkin@katalix.com>
Thu, 31 Jan 2013 23:43:02 +0000 (23:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Feb 2013 19:20:30 +0000 (14:20 -0500)
commit99c73d761d24c0206a672146a39a81a1aa1b4703
tree7e129315b5df29e6bbb9bc590c61f9f5b5e510b8
parent98d6d2e4057b024abfa2b769895278f784d3e092
l2tp: prevent tunnel creation on netns mismatch

l2tp_tunnel_create is passed a pointer to the network namespace for the
tunnel, along with an optional file descriptor for the tunnel which may
be passed in from userspace via. netlink.

In the case where the file descriptor is defined, ensure that the namespace
associated with that socket matches the namespace explicitly passed to
l2tp_tunnel_create.

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