[PATCH] mesh: Remove mesh station after link is closed
Saurav Babu
saurav.babu at samsung.com
Wed Sep 6 02:23:24 PDT 2017
> 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 at samsung.com>
---
> 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
More information about the Hostap
mailing list