summaryrefslogtreecommitdiff
path: root/fs/afs/netdevices.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2018-05-18 11:46:15 +0100
committerDavid Howells <dhowells@redhat.com>2018-05-23 12:01:15 +0100
commit5b86d4ff5dce3271dff54119e06174dc22422903 (patch)
tree04916e2272e82554f18b8d442de0a14b9cf84558 /fs/afs/netdevices.c
parent1588def91d58bf70afe1acf9fc0331fa26e974f4 (diff)
afs: Implement network namespacing
Implement network namespacing within AFS, but don't yet let mounts occur outside the init namespace. An additional patch will be required propagate the network namespace across automounts. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/netdevices.c')
-rw-r--r--fs/afs/netdevices.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/afs/netdevices.c b/fs/afs/netdevices.c
index 50bd5bb1c4fb..2a009d1939d7 100644
--- a/fs/afs/netdevices.c
+++ b/fs/afs/netdevices.c
@@ -17,8 +17,8 @@
* - maxbufs must be at least 1
* - returns the number of interface records in the buffer
*/
-int afs_get_ipv4_interfaces(struct afs_interface *bufs, size_t maxbufs,
- bool wantloopback)
+int afs_get_ipv4_interfaces(struct afs_net *net, struct afs_interface *bufs,
+ size_t maxbufs, bool wantloopback)
{
struct net_device *dev;
struct in_device *idev;
@@ -27,7 +27,7 @@ int afs_get_ipv4_interfaces(struct afs_interface *bufs, size_t maxbufs,
ASSERT(maxbufs > 0);
rtnl_lock();
- for_each_netdev(&init_net, dev) {
+ for_each_netdev(net->net, dev) {
if (dev->type == ARPHRD_LOOPBACK && !wantloopback)
continue;
idev = __in_dev_get_rtnl(dev);