Commit 4e9fb801 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by David S. Miller

net: pppol2tp - introduce net-namespace functionality

- Each tunnel and appropriate lock are inside own namespace now.
- pppox code allows to create per-namespace sockets for
  both PX_PROTO_OE and PX_PROTO_OL2TP protocols. Actually since
  now pppox_create support net-namespaces new PPPo... protocols
  (if they ever will be) should support net-namespace too otherwise
  explicit check for &init_net would be needed.
Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: default avatarJames Chapman <jchapman@katalix.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a6bcf1c1
This diff is collapsed.
...@@ -111,10 +111,6 @@ static int pppox_create(struct net *net, struct socket *sock, int protocol) ...@@ -111,10 +111,6 @@ static int pppox_create(struct net *net, struct socket *sock, int protocol)
if (protocol < 0 || protocol > PX_MAX_PROTO) if (protocol < 0 || protocol > PX_MAX_PROTO)
goto out; goto out;
/* we support net-namespaces for PPPoE only (yet) */
if (protocol != PX_PROTO_OE && net != &init_net)
return -EAFNOSUPPORT;
rc = -EPROTONOSUPPORT; rc = -EPROTONOSUPPORT;
if (!pppox_protos[protocol]) if (!pppox_protos[protocol])
request_module("pppox-proto-%d", protocol); request_module("pppox-proto-%d", protocol);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment