diff options
author | Rémi Denis-Courmont <remi.denis-courmont@nokia.com> | 2008-12-03 18:42:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-03 18:42:56 -0500 |
commit | 52404881984e2d447f920a23e3bb63262dfc77f3 (patch) | |
tree | 531b4ac50fe372d26bf950c77d31f2ddcb40153c /net/phonet/af_phonet.c | |
parent | d81d228567f55af517796638075dbbce9b40d7af (diff) |
Phonet: basic net namespace support
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet/af_phonet.c')
-rw-r--r-- | net/phonet/af_phonet.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index 9d211f12582b..13cb323f8c38 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c | |||
@@ -67,9 +67,6 @@ static int pn_socket_create(struct net *net, struct socket *sock, int protocol) | |||
67 | struct phonet_protocol *pnp; | 67 | struct phonet_protocol *pnp; |
68 | int err; | 68 | int err; |
69 | 69 | ||
70 | if (net != &init_net) | ||
71 | return -EAFNOSUPPORT; | ||
72 | |||
73 | if (!capable(CAP_SYS_ADMIN)) | 70 | if (!capable(CAP_SYS_ADMIN)) |
74 | return -EPERM; | 71 | return -EPERM; |
75 | 72 | ||
@@ -352,9 +349,6 @@ static int phonet_rcv(struct sk_buff *skb, struct net_device *dev, | |||
352 | struct sockaddr_pn sa; | 349 | struct sockaddr_pn sa; |
353 | u16 len; | 350 | u16 len; |
354 | 351 | ||
355 | if (dev_net(dev) != &init_net) | ||
356 | goto out; | ||
357 | |||
358 | /* check we have at least a full Phonet header */ | 352 | /* check we have at least a full Phonet header */ |
359 | if (!pskb_pull(skb, sizeof(struct phonethdr))) | 353 | if (!pskb_pull(skb, sizeof(struct phonethdr))) |
360 | goto out; | 354 | goto out; |
@@ -373,7 +367,7 @@ static int phonet_rcv(struct sk_buff *skb, struct net_device *dev, | |||
373 | if (pn_sockaddr_get_addr(&sa) == 0) | 367 | if (pn_sockaddr_get_addr(&sa) == 0) |
374 | goto out; /* currently, we cannot be device 0 */ | 368 | goto out; /* currently, we cannot be device 0 */ |
375 | 369 | ||
376 | sk = pn_find_sock_by_sa(&sa); | 370 | sk = pn_find_sock_by_sa(dev_net(dev), &sa); |
377 | if (sk == NULL) { | 371 | if (sk == NULL) { |
378 | if (can_respond(skb)) { | 372 | if (can_respond(skb)) { |
379 | send_obj_unreachable(skb); | 373 | send_obj_unreachable(skb); |