Commit 8257f55a authored by Antonio Quartulli's avatar Antonio Quartulli Committed by Antonio Quartulli

batman-adv: send GW_DEL event in case of soft-iface destruction

In case of soft_iface destruction send a GW DEL event to
userspace so that applications which are listening for GW
events are informed about the lost of connectivity and can
react accordingly.
Signed-off-by: default avatarAntonio Quartulli <antonio@open-mesh.com>
Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
parent a19d3d85
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "originator.h" #include "originator.h"
#include "hash.h" #include "hash.h"
#include "bridge_loop_avoidance.h" #include "bridge_loop_avoidance.h"
#include "gateway_client.h"
#include <linux/if_arp.h> #include <linux/if_arp.h>
#include <linux/if_ether.h> #include <linux/if_ether.h>
...@@ -535,8 +536,12 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface, ...@@ -535,8 +536,12 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,
dev_put(hard_iface->soft_iface); dev_put(hard_iface->soft_iface);
/* nobody uses this interface anymore */ /* nobody uses this interface anymore */
if (!bat_priv->num_ifaces && autodel == BATADV_IF_CLEANUP_AUTO) if (!bat_priv->num_ifaces) {
batadv_softif_destroy_sysfs(hard_iface->soft_iface); batadv_gw_check_client_stop(bat_priv);
if (autodel == BATADV_IF_CLEANUP_AUTO)
batadv_softif_destroy_sysfs(hard_iface->soft_iface);
}
netdev_upper_dev_unlink(hard_iface->net_dev, hard_iface->soft_iface); netdev_upper_dev_unlink(hard_iface->net_dev, hard_iface->soft_iface);
hard_iface->soft_iface = NULL; hard_iface->soft_iface = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment