summaryrefslogtreecommitdiffstats
path: root/drivers/net/pppox.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pppox.c')
-rw-r--r--drivers/net/pppox.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/pppox.c b/drivers/net/pppox.c
index 03aecc97fb45..ee9d3cf81beb 100644
--- a/drivers/net/pppox.c
+++ b/drivers/net/pppox.c
@@ -108,12 +108,13 @@ static int pppox_create(struct net *net, struct socket *sock, int protocol)
{
int rc = -EPROTOTYPE;
- if (net != &init_net)
- return -EAFNOSUPPORT;
-
if (protocol < 0 || protocol > PX_MAX_PROTO)
goto out;
+ /* we support net-namespaces for PPPoE only (yet) */
+ if (protocol != PX_PROTO_OE && net != &init_net)
+ return -EAFNOSUPPORT;
+
rc = -EPROTONOSUPPORT;
if (!pppox_protos[protocol])
request_module("pppox-proto-%d", protocol);