aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ieee802_11.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-12-23 11:44:38 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-23 11:44:38 (GMT)
commit3a322496f9f73a4393513392a23389ad0d5382df (patch)
tree9ad976f97a5c247955cb131fdbb79aceba293fa8 /src/ap/ieee802_11.c
parente0cfd223c0b123d0470f07df5bf1321e82542d0a (diff)
downloadhostap-3a322496f9f73a4393513392a23389ad0d5382df.zip
hostap-3a322496f9f73a4393513392a23389ad0d5382df.tar.gz
hostap-3a322496f9f73a4393513392a23389ad0d5382df.tar.bz2
mesh: Delay Authentication frame process with no_auto_peer
There is a possible race condition between receiving the NEW_PEER_CANDIDATE event and the Authentication frame from the peer. Previously, if the Authentication frame RX event was indicated first, that frame got dropped silently. Now, this frame is still dropped, but a copy of it is stored and the frame gets processed on the following NEW_PEER_CANDIDATE event if that is received for the same peer within two seconds. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/ieee802_11.c')
-rw-r--r--src/ap/ieee802_11.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 09c398a..97f98f2 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -889,6 +889,16 @@ static void handle_auth(struct hostapd_data *hapd,
if (hapd->conf->mesh & MESH_ENABLED) {
/* if the mesh peer is not available, we don't do auth.
*/
+ wpa_printf(MSG_DEBUG, "Mesh peer " MACSTR
+ " not yet known - drop Authentiation frame",
+ MAC2STR(mgmt->sa));
+ /*
+ * Save a copy of the frame so that it can be processed
+ * if a new peer entry is added shortly after this.
+ */
+ wpabuf_free(hapd->mesh_pending_auth);
+ hapd->mesh_pending_auth = wpabuf_alloc_copy(mgmt, len);
+ os_get_reltime(&hapd->mesh_pending_auth_time);
return;
}
#endif /* CONFIG_MESH */