aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh_mpm.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-01-06 15:20:20 (GMT)
committerJouni Malinen <j@w1.fi>2016-01-06 15:50:15 (GMT)
commit27446e471c5e08913e8230b90ffc6c2a5659d10a (patch)
tree031e70db0445165a6aa13e6d4b7d16296075a2d7 /wpa_supplicant/mesh_mpm.c
parentcc64fe7b9e3104c4cb990eb410930676de749e02 (diff)
downloadhostap-27446e471c5e08913e8230b90ffc6c2a5659d10a.zip
hostap-27446e471c5e08913e8230b90ffc6c2a5659d10a.tar.gz
hostap-27446e471c5e08913e8230b90ffc6c2a5659d10a.tar.bz2
mesh: Do not force another peering exchange on driver event
If the local driver indicated a peer candidate event when the peer had already initiated peering exchange in open mesh case, we used to force a new exchange to be started instead of allowing the previously started exchange to complete. This is not desirable, so make this initiation of the new exchange conditional on there not being an already started (or successfully completed) exchange. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/mesh_mpm.c')
-rw-r--r--wpa_supplicant/mesh_mpm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index def1c40..d509d7d 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -669,10 +669,13 @@ void wpa_mesh_new_mesh_peer(struct wpa_supplicant *wpa_s, const u8 *addr,
return;
}
- if (conf->security == MESH_CONF_SEC_NONE)
- mesh_mpm_plink_open(wpa_s, sta, PLINK_OPEN_SENT);
- else
+ if (conf->security == MESH_CONF_SEC_NONE) {
+ if (sta->plink_state < PLINK_OPEN_SENT ||
+ sta->plink_state > PLINK_ESTAB)
+ mesh_mpm_plink_open(wpa_s, sta, PLINK_OPEN_SENT);
+ } else {
mesh_rsn_auth_sae_sta(wpa_s, sta);
+ }
}