diff options
Diffstat (limited to 'net/appletalk/ddp.c')
-rw-r--r-- | net/appletalk/ddp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 594b59739546..fd1d52f09707 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -1026,11 +1026,14 @@ static struct proto ddp_proto = { | |||
1026 | * Create a socket. Initialise the socket, blank the addresses | 1026 | * Create a socket. Initialise the socket, blank the addresses |
1027 | * set the state. | 1027 | * set the state. |
1028 | */ | 1028 | */ |
1029 | static int atalk_create(struct socket *sock, int protocol) | 1029 | static int atalk_create(struct net *net, struct socket *sock, int protocol) |
1030 | { | 1030 | { |
1031 | struct sock *sk; | 1031 | struct sock *sk; |
1032 | int rc = -ESOCKTNOSUPPORT; | 1032 | int rc = -ESOCKTNOSUPPORT; |
1033 | 1033 | ||
1034 | if (net != &init_net) | ||
1035 | return -EAFNOSUPPORT; | ||
1036 | |||
1034 | /* | 1037 | /* |
1035 | * We permit SOCK_DGRAM and RAW is an extension. It is trivial to do | 1038 | * We permit SOCK_DGRAM and RAW is an extension. It is trivial to do |
1036 | * and gives you the full ELAP frame. Should be handy for CAP 8) | 1039 | * and gives you the full ELAP frame. Should be handy for CAP 8) |
@@ -1038,7 +1041,7 @@ static int atalk_create(struct socket *sock, int protocol) | |||
1038 | if (sock->type != SOCK_RAW && sock->type != SOCK_DGRAM) | 1041 | if (sock->type != SOCK_RAW && sock->type != SOCK_DGRAM) |
1039 | goto out; | 1042 | goto out; |
1040 | rc = -ENOMEM; | 1043 | rc = -ENOMEM; |
1041 | sk = sk_alloc(PF_APPLETALK, GFP_KERNEL, &ddp_proto, 1); | 1044 | sk = sk_alloc(net, PF_APPLETALK, GFP_KERNEL, &ddp_proto, 1); |
1042 | if (!sk) | 1045 | if (!sk) |
1043 | goto out; | 1046 | goto out; |
1044 | rc = 0; | 1047 | rc = 0; |