]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/phonet/af_phonet.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[linux-2.6-omap-h63xx.git] / net / phonet / af_phonet.c
index 9d211f12582ba90882ae9f272a6896b716d83af4..13cb323f8c382bad79f287bb5636ed0ee34271df 100644 (file)
@@ -67,9 +67,6 @@ static int pn_socket_create(struct net *net, struct socket *sock, int protocol)
        struct phonet_protocol *pnp;
        int err;
 
-       if (net != &init_net)
-               return -EAFNOSUPPORT;
-
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;
 
@@ -352,9 +349,6 @@ static int phonet_rcv(struct sk_buff *skb, struct net_device *dev,
        struct sockaddr_pn sa;
        u16 len;
 
-       if (dev_net(dev) != &init_net)
-               goto out;
-
        /* check we have at least a full Phonet header */
        if (!pskb_pull(skb, sizeof(struct phonethdr)))
                goto out;
@@ -373,7 +367,7 @@ static int phonet_rcv(struct sk_buff *skb, struct net_device *dev,
        if (pn_sockaddr_get_addr(&sa) == 0)
                goto out; /* currently, we cannot be device 0 */
 
-       sk = pn_find_sock_by_sa(&sa);
+       sk = pn_find_sock_by_sa(dev_net(dev), &sa);
        if (sk == NULL) {
                if (can_respond(skb)) {
                        send_obj_unreachable(skb);