diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2013-08-19 12:39:59 -0400 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2013-10-23 11:03:44 -0400 |
commit | 8257f55ae277dd94c015f7cf32f4afd1db59fe8d (patch) | |
tree | 4d351857bde9e56bf853f2cddf910d02cc53b514 /net/batman-adv | |
parent | a19d3d85e1b854e4a483a55d740a42458085560d (diff) |
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: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/hard-interface.c | 9 |
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; |