]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
mesh: Always free the station if peering failed
authorBob Copeland <me@bobcopeland.com>
Tue, 27 Jan 2015 13:17:58 +0000 (08:17 -0500)
committerJouni Malinen <j@w1.fi>
Wed, 28 Jan 2015 11:09:31 +0000 (13:09 +0200)
Previously, we would only free the station entry if a peering close
frame was received (freeing the station entry causes the kernel to
start sending peer candidate events again when suitable beacons are
received, triggering peering or authentication to restart).

The end result is the same in any case regardless of close reason:
if we leave holding state then peering has started again, so go
ahead and remove the station in all cases.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
wpa_supplicant/mesh_mpm.c

index 0da7e1373aceac4a3f83341d31237669055b8dc4..bc61da96ed87250398a60ec719bd168b2d325fed 100644 (file)
@@ -384,14 +384,7 @@ static void mesh_mpm_fsm_restart(struct wpa_supplicant *wpa_s,
 
        eloop_cancel_timeout(plink_timer, wpa_s, sta);
 
-       if (sta->mpm_close_reason == WLAN_REASON_MESH_CLOSE_RCVD) {
-               ap_free_sta(hapd, sta);
-               return;
-       }
-
-       wpa_mesh_set_plink_state(wpa_s, sta, PLINK_LISTEN);
-       sta->my_lid = sta->peer_lid = sta->mpm_close_reason = 0;
-       sta->mpm_retries = 0;
+       ap_free_sta(hapd, sta);
 }