batman-adv: send GW_DEL event in case of soft-iface destruction
PATCH 1/1 batman-adv: send GW_DEL event in case of soft-iface destruction
From: Antonio Quartulli <[email protected]>
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 <[email protected]>
--- hard-interface.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
hard-interface.c +7 -2
@@ -28,6 +28,7 @@#include "originator.h" #include "hash.h" #include "bridge_loop_avoidance.h" +#include "gateway_client.h" #include <linux/if_arp.h> #include <linux/if_ether.h>
@@ -524,8 +525,12 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,dev_put (hard_iface->soft_iface);/* nobody uses this interface anymore */ -if (!bat_priv->num_ifaces && autodel ==BATADV_IF_CLEANUP_AUTO ) -batadv_softif_destroy_sysfs (hard_iface->soft_iface); +if (!bat_priv->num_ifaces) { +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); hard_iface->soft_iface =NULL ;
Signature · 1 line
1.8.1.5
Marek Lindner
AppliedQuoted 11 lines · On Monday 19 August 2013 18:39:59 Antonio Quartulli wrote:
From: Antonio Quartulli <[email protected]>
In case of
soft_ifacedestruction 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 <[email protected]>--- hard-interface.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Applied in revision e65bb36.
Thanks,
Marek