[NET]: Make the device list and device lookups per namespace.
[deliverable/linux.git] / net / ipv6 / ip6_tunnel.c
index ca774d8e3be35e09c010db9aae493e7db6be997f..937625e577c12357e902b10d72c7e110e09fefa6 100644 (file)
@@ -235,7 +235,7 @@ static struct ip6_tnl *ip6_tnl_create(struct ip6_tnl_parm *p)
                int i;
                for (i = 1; i < IP6_TNL_MAX; i++) {
                        sprintf(name, "ip6tnl%d", i);
-                       if (__dev_get_by_name(name) == NULL)
+                       if (__dev_get_by_name(&init_net, name) == NULL)
                                break;
                }
                if (i == IP6_TNL_MAX)
@@ -650,7 +650,7 @@ static inline int ip6_tnl_rcv_ctl(struct ip6_tnl *t)
                struct net_device *ldev = NULL;
 
                if (p->link)
-                       ldev = dev_get_by_index(p->link);
+                       ldev = dev_get_by_index(&init_net, p->link);
 
                if ((ipv6_addr_is_multicast(&p->laddr) ||
                     likely(ipv6_chk_addr(&p->laddr, ldev, 0))) &&
@@ -786,7 +786,7 @@ static inline int ip6_tnl_xmit_ctl(struct ip6_tnl *t)
                struct net_device *ldev = NULL;
 
                if (p->link)
-                       ldev = dev_get_by_index(p->link);
+                       ldev = dev_get_by_index(&init_net, p->link);
 
                if (unlikely(!ipv6_chk_addr(&p->laddr, ldev, 0)))
                        printk(KERN_WARNING
This page took 0.026195 seconds and 5 git commands to generate.