diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-04-21 13:57:27 +0300 |
---|---|---|
committer | Antonio Quartulli <a@unstable.cc> | 2016-05-10 13:26:44 +0300 |
commit | 2cd45a0671d9e37ab20e844fc4c84717a38b7f52 (patch) | |
tree | 942ed97ece08be93115eaebf09d98515ef45c608 /net/batman-adv/sysfs.c | |
parent | 0d21cdaa9bbf5efae95cfb6346d26ff6e61f8896 (diff) | |
download | linux-2cd45a0671d9e37ab20e844fc4c84717a38b7f52.tar.xz |
batman-adv: Create batman soft interfaces within correct netns.
When creating a soft interface, create it in the same netns as the
hard interface. Replace all references to init_net with the correct
name space for the interface being manipulated.
Suggested-by: Daniel Ehlers <danielehlers@mindeye.net>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Antonio Quartulli <a@unstable.cc>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Diffstat (limited to 'net/batman-adv/sysfs.c')
-rw-r--r-- | net/batman-adv/sysfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/batman-adv/sysfs.c b/net/batman-adv/sysfs.c index e7cf51333a36..6b1e54f3250a 100644 --- a/net/batman-adv/sysfs.c +++ b/net/batman-adv/sysfs.c @@ -830,6 +830,7 @@ static ssize_t batadv_store_mesh_iface(struct kobject *kobj, size_t count) { struct net_device *net_dev = batadv_kobj_to_netdev(kobj); + struct net *net = dev_net(net_dev); struct batadv_hard_iface *hard_iface; int status_tmp = -1; int ret = count; @@ -873,7 +874,7 @@ static ssize_t batadv_store_mesh_iface(struct kobject *kobj, batadv_hardif_disable_interface(hard_iface, BATADV_IF_CLEANUP_AUTO); - ret = batadv_hardif_enable_interface(hard_iface, buff); + ret = batadv_hardif_enable_interface(hard_iface, net, buff); unlock: rtnl_unlock(); |