aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/batman-adv/hard-interface.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index c60d3ed40257..1ba8a552b62b 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -28,6 +28,7 @@
28#include "originator.h" 28#include "originator.h"
29#include "hash.h" 29#include "hash.h"
30#include "bridge_loop_avoidance.h" 30#include "bridge_loop_avoidance.h"
31#include "gateway_client.h"
31 32
32#include <linux/if_arp.h> 33#include <linux/if_arp.h>
33#include <linux/if_ether.h> 34#include <linux/if_ether.h>
@@ -535,8 +536,12 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,
535 dev_put(hard_iface->soft_iface); 536 dev_put(hard_iface->soft_iface);
536 537
537 /* nobody uses this interface anymore */ 538 /* nobody uses this interface anymore */
538 if (!bat_priv->num_ifaces && autodel == BATADV_IF_CLEANUP_AUTO) 539 if (!bat_priv->num_ifaces) {
539 batadv_softif_destroy_sysfs(hard_iface->soft_iface); 540 batadv_gw_check_client_stop(bat_priv);
541
542 if (autodel == BATADV_IF_CLEANUP_AUTO)
543 batadv_softif_destroy_sysfs(hard_iface->soft_iface);
544 }
540 545
541 netdev_upper_dev_unlink(hard_iface->net_dev, hard_iface->soft_iface); 546 netdev_upper_dev_unlink(hard_iface->net_dev, hard_iface->soft_iface);
542 hard_iface->soft_iface = NULL; 547 hard_iface->soft_iface = NULL;