]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wan/dlci.c
[NET]: Make the device list and device lookups per namespace.
[linux-2.6-omap-h63xx.git] / drivers / net / wan / dlci.c
index 66be20c292b6dcd8855ec84830a15e7850c70baa..bc12810157e09449a956bd2b0e6661d5d4cddd0d 100644 (file)
@@ -361,7 +361,7 @@ static int dlci_add(struct dlci_add *dlci)
 
 
        /* validate slave device */
-       slave = dev_get_by_name(dlci->devname);
+       slave = dev_get_by_name(&init_net, dlci->devname);
        if (!slave)
                return -ENODEV;
 
@@ -427,7 +427,7 @@ static int dlci_del(struct dlci_add *dlci)
        int                     err;
 
        /* validate slave device */
-       master = __dev_get_by_name(dlci->devname);
+       master = __dev_get_by_name(&init_net, dlci->devname);
        if (!master)
                return(-ENODEV);
 
@@ -513,6 +513,9 @@ static int dlci_dev_event(struct notifier_block *unused,
 {
        struct net_device *dev = (struct net_device *) ptr;
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        if (event == NETDEV_UNREGISTER) {
                struct dlci_local *dlp;