[PATCH] mesh: Remove mesh station after link is closed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Mesh peering manager maintains links among mesh peers, but when link is
> closed then it doesn't remove station due to which station is always
> present in connected peer list. This patch registers timeout after state
> is changed to PLINK_HOLDING so that station can be removed after timeout
> is expired
It seems more changes are required, I'll update this patchset later

> Signed-off-by: Saurav Babu <saurav.babu@xxxxxxxxxxx>
---
>  wpa_supplicant/mesh_mpm.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

> diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
> index cf7107e..b369743 100644
> --- a/wpa_supplicant/mesh_mpm.c
> +++ b/wpa_supplicant/mesh_mpm.c
> @@ -487,13 +487,16 @@ static int mesh_mpm_plink_close(struct hostapd_data *hapd, struct sta_info *sta,
>  {
>  	struct wpa_supplicant *wpa_s = ctx;
>  	int reason = WLAN_REASON_MESH_PEERING_CANCELLED;
> +	struct mesh_conf *conf = wpa_s->ifmsh->mconf;
  
>  	if (sta) {
>  		wpa_mesh_set_plink_state(wpa_s, sta, PLINK_HOLDING);
> +		eloop_register_timeout(conf->dot11MeshHoldingTimeout / 1000,
> +			(conf->dot11MeshHoldingTimeout % 1000) * 1000,
> +			plink_timer, wpa_s, sta);
>  		mesh_mpm_send_plink_action(wpa_s, sta, PLINK_CLOSE, reason);
>  		wpa_printf(MSG_DEBUG, "MPM closing plink sta=" MACSTR,
>  			   MAC2STR(sta->addr));
> -		eloop_cancel_timeout(plink_timer, wpa_s, sta);
>  		return 0;
>  	}
 
> -- 
1.9.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux