diff options
Diffstat (limited to 'net/atm/svc.c')
-rw-r--r-- | net/atm/svc.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/atm/svc.c b/net/atm/svc.c index 53d04c7992cf..daf9a48a7db0 100644 --- a/net/atm/svc.c +++ b/net/atm/svc.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "signaling.h" | 25 | #include "signaling.h" |
26 | #include "addr.h" | 26 | #include "addr.h" |
27 | 27 | ||
28 | static int svc_create(struct socket *sock,int protocol); | 28 | static int svc_create(struct net *net, struct socket *sock,int protocol); |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * Note: since all this is still nicely synchronized with the signaling demon, | 31 | * Note: since all this is still nicely synchronized with the signaling demon, |
@@ -326,7 +326,7 @@ static int svc_accept(struct socket *sock,struct socket *newsock,int flags) | |||
326 | 326 | ||
327 | lock_sock(sk); | 327 | lock_sock(sk); |
328 | 328 | ||
329 | error = svc_create(newsock,0); | 329 | error = svc_create(sk->sk_net, newsock,0); |
330 | if (error) | 330 | if (error) |
331 | goto out; | 331 | goto out; |
332 | 332 | ||
@@ -627,12 +627,15 @@ static const struct proto_ops svc_proto_ops = { | |||
627 | }; | 627 | }; |
628 | 628 | ||
629 | 629 | ||
630 | static int svc_create(struct socket *sock,int protocol) | 630 | static int svc_create(struct net *net, struct socket *sock,int protocol) |
631 | { | 631 | { |
632 | int error; | 632 | int error; |
633 | 633 | ||
634 | if (net != &init_net) | ||
635 | return -EAFNOSUPPORT; | ||
636 | |||
634 | sock->ops = &svc_proto_ops; | 637 | sock->ops = &svc_proto_ops; |
635 | error = vcc_create(sock, protocol, AF_ATMSVC); | 638 | error = vcc_create(net, sock, protocol, AF_ATMSVC); |
636 | if (error) return error; | 639 | if (error) return error; |
637 | ATM_SD(sock)->local.sas_family = AF_ATMSVC; | 640 | ATM_SD(sock)->local.sas_family = AF_ATMSVC; |
638 | ATM_SD(sock)->remote.sas_family = AF_ATMSVC; | 641 | ATM_SD(sock)->remote.sas_family = AF_ATMSVC; |