diff options
author | David Howells <dhowells@redhat.com> | 2018-05-18 12:46:15 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2018-05-23 13:01:15 +0200 |
commit | 5b86d4ff5dce3271dff54119e06174dc22422903 (patch) | |
tree | 04916e2272e82554f18b8d442de0a14b9cf84558 /fs/afs/netdevices.c | |
parent | afs: Mark afs_net::ws_cell as __rcu and set using rcu functions (diff) | |
download | linux-5b86d4ff5dce3271dff54119e06174dc22422903.tar.xz linux-5b86d4ff5dce3271dff54119e06174dc22422903.zip |
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.c | 6 |
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); |