]> err.no Git - linux-2.6/blobdiff - net/econet/af_econet.c
[MAC80211]: remove turbo modes
[linux-2.6] / net / econet / af_econet.c
index a2429dbcb86ee3639e4536754176798f02b2a7ff..9938e76a8ff62a6f9854e61a169ea63fb316dd34 100644 (file)
@@ -662,7 +662,7 @@ static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void __user *arg)
        if (copy_from_user(&ifr, arg, sizeof(struct ifreq)))
                return -EFAULT;
 
-       if ((dev = dev_get_by_name(ifr.ifr_name)) == NULL)
+       if ((dev = dev_get_by_name(&init_net, ifr.ifr_name)) == NULL)
                return -ENODEV;
 
        sec = (struct sockaddr_ec *)&ifr.ifr_addr;
@@ -1065,6 +1065,9 @@ static int econet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet
        struct sock *sk;
        struct ec_device *edev = dev->ec_ptr;
 
+       if (dev->nd_net != &init_net)
+               goto drop;
+
        if (skb->pkt_type == PACKET_OTHERHOST)
                goto drop;
 
@@ -1119,6 +1122,9 @@ static int econet_notifier(struct notifier_block *this, unsigned long msg, void
        struct net_device *dev = (struct net_device *)data;
        struct ec_device *edev;
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        switch (msg) {
        case NETDEV_UNREGISTER:
                /* A device has gone down - kill any data we hold for it. */