diff options
Diffstat (limited to 'fs/afs/netdevices.c')
-rw-r--r-- | fs/afs/netdevices.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/afs/netdevices.c b/fs/afs/netdevices.c index fc27d4b52e5..49f18942306 100644 --- a/fs/afs/netdevices.c +++ b/fs/afs/netdevices.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/inetdevice.h> | 8 | #include <linux/inetdevice.h> |
9 | #include <linux/netdevice.h> | 9 | #include <linux/netdevice.h> |
10 | #include <linux/if_arp.h> | 10 | #include <linux/if_arp.h> |
11 | #include <net/net_namespace.h> | ||
11 | #include "internal.h" | 12 | #include "internal.h" |
12 | 13 | ||
13 | /* | 14 | /* |
@@ -23,7 +24,7 @@ int afs_get_MAC_address(u8 *mac, size_t maclen) | |||
23 | BUG(); | 24 | BUG(); |
24 | 25 | ||
25 | rtnl_lock(); | 26 | rtnl_lock(); |
26 | dev = __dev_getfirstbyhwtype(ARPHRD_ETHER); | 27 | dev = __dev_getfirstbyhwtype(&init_net, ARPHRD_ETHER); |
27 | if (dev) { | 28 | if (dev) { |
28 | memcpy(mac, dev->dev_addr, maclen); | 29 | memcpy(mac, dev->dev_addr, maclen); |
29 | ret = 0; | 30 | ret = 0; |
@@ -47,7 +48,7 @@ int afs_get_ipv4_interfaces(struct afs_interface *bufs, size_t maxbufs, | |||
47 | ASSERT(maxbufs > 0); | 48 | ASSERT(maxbufs > 0); |
48 | 49 | ||
49 | rtnl_lock(); | 50 | rtnl_lock(); |
50 | for_each_netdev(dev) { | 51 | for_each_netdev(&init_net, dev) { |
51 | if (dev->type == ARPHRD_LOOPBACK && !wantloopback) | 52 | if (dev->type == ARPHRD_LOOPBACK && !wantloopback) |
52 | continue; | 53 | continue; |
53 | idev = __in_dev_get_rtnl(dev); | 54 | idev = __in_dev_get_rtnl(dev); |