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>
This commit is contained in:

committed by
Antonio Quartulli

parent
0d21cdaa9b
commit
2cd45a0671
@@ -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();
|
||||
|
Reference in New Issue
Block a user