aboutsummaryrefslogtreecommitdiffstats
path: root/net/rose
diff options
context:
space:
mode:
Diffstat (limited to 'net/rose')
-rw-r--r--net/rose/rose_route.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index 96f61a71b252..540c0f26ffee 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -583,7 +583,7 @@ static struct net_device *rose_ax25_dev_get(char *devname)
583{ 583{
584 struct net_device *dev; 584 struct net_device *dev;
585 585
586 if ((dev = dev_get_by_name(devname)) == NULL) 586 if ((dev = dev_get_by_name(&init_net, devname)) == NULL)
587 return NULL; 587 return NULL;
588 588
589 if ((dev->flags & IFF_UP) && dev->type == ARPHRD_AX25) 589 if ((dev->flags & IFF_UP) && dev->type == ARPHRD_AX25)
@@ -601,7 +601,7 @@ struct net_device *rose_dev_first(void)
601 struct net_device *dev, *first = NULL; 601 struct net_device *dev, *first = NULL;
602 602
603 read_lock(&dev_base_lock); 603 read_lock(&dev_base_lock);
604 for_each_netdev(dev) { 604 for_each_netdev(&init_net, dev) {
605 if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE) 605 if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE)
606 if (first == NULL || strncmp(dev->name, first->name, 3) < 0) 606 if (first == NULL || strncmp(dev->name, first->name, 3) < 0)
607 first = dev; 607 first = dev;
@@ -619,7 +619,7 @@ struct net_device *rose_dev_get(rose_address *addr)
619 struct net_device *dev; 619 struct net_device *dev;
620 620
621 read_lock(&dev_base_lock); 621 read_lock(&dev_base_lock);
622 for_each_netdev(dev) { 622 for_each_netdev(&init_net, dev) {
623 if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE && rosecmp(addr, (rose_address *)dev->dev_addr) == 0) { 623 if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE && rosecmp(addr, (rose_address *)dev->dev_addr) == 0) {
624 dev_hold(dev); 624 dev_hold(dev);
625 goto out; 625 goto out;
@@ -636,7 +636,7 @@ static int rose_dev_exists(rose_address *addr)
636 struct net_device *dev; 636 struct net_device *dev;
637 637
638 read_lock(&dev_base_lock); 638 read_lock(&dev_base_lock);
639 for_each_netdev(dev) { 639 for_each_netdev(&init_net, dev) {
640 if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE && rosecmp(addr, (rose_address *)dev->dev_addr) == 0) 640 if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE && rosecmp(addr, (rose_address *)dev->dev_addr) == 0)
641 goto out; 641 goto out;
642 } 642 }