[NET]: Make the device list and device lookups per namespace.
[pandora-kernel.git] / drivers / net / wan / dlci.c
index 7369875..bc12810 100644 (file)
@@ -176,7 +176,7 @@ static void dlci_receive(struct sk_buff *skb, struct net_device *dev)
        if (process)
        {
                /* we've set up the protocol, so discard the header */
-               skb->mac.raw = skb->data; 
+               skb_reset_mac_header(skb);
                skb_pull(skb, header);
                dlp->stats.rx_bytes += skb->len;
                netif_rx(skb);
@@ -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;