diff options
Diffstat (limited to 'drivers/net/pppox.c')
-rw-r--r-- | drivers/net/pppox.c | 7 |
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) | |||
108 | { | 108 | { |
109 | int rc = -EPROTOTYPE; | 109 | int rc = -EPROTOTYPE; |
110 | 110 | ||
111 | if (net != &init_net) | ||
112 | return -EAFNOSUPPORT; | ||
113 | |||
114 | if (protocol < 0 || protocol > PX_MAX_PROTO) | 111 | if (protocol < 0 || protocol > PX_MAX_PROTO) |
115 | goto out; | 112 | goto out; |
116 | 113 | ||
114 | /* we support net-namespaces for PPPoE only (yet) */ | ||
115 | if (protocol != PX_PROTO_OE && net != &init_net) | ||
116 | return -EAFNOSUPPORT; | ||
117 | |||
117 | rc = -EPROTONOSUPPORT; | 118 | rc = -EPROTONOSUPPORT; |
118 | if (!pppox_protos[protocol]) | 119 | if (!pppox_protos[protocol]) |
119 | request_module("pppox-proto-%d", protocol); | 120 | request_module("pppox-proto-%d", protocol); |