[NET]: Make the device list and device lookups per namespace.
[deliverable/linux.git] / net / decnet / dn_route.c
index 580e786d0c3862ccc6fea2e0d25c47f5646aa7f4..70b1c3fa00f3793c44ea54bff14278b5cee96998 100644 (file)
@@ -908,7 +908,7 @@ static int dn_route_output_slow(struct dst_entry **pprt, const struct flowi *old
 
        /* If we have an output interface, verify its a DECnet device */
        if (oldflp->oif) {
-               dev_out = dev_get_by_index(oldflp->oif);
+               dev_out = dev_get_by_index(&init_net, oldflp->oif);
                err = -ENODEV;
                if (dev_out && dev_out->dn_ptr == NULL) {
                        dev_put(dev_out);
@@ -929,7 +929,7 @@ static int dn_route_output_slow(struct dst_entry **pprt, const struct flowi *old
                        goto out;
                }
                read_lock(&dev_base_lock);
-               for_each_netdev(dev) {
+               for_each_netdev(&init_net, dev) {
                        if (!dev->dn_ptr)
                                continue;
                        if (!dn_dev_islocal(dev, oldflp->fld_src))
@@ -1556,7 +1556,7 @@ static int dn_cache_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, void
 
        if (fl.iif) {
                struct net_device *dev;
-               if ((dev = dev_get_by_index(fl.iif)) == NULL) {
+               if ((dev = dev_get_by_index(&init_net, fl.iif)) == NULL) {
                        kfree_skb(skb);
                        return -ENODEV;
                }
This page took 0.031312 seconds and 5 git commands to generate.