]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Increase initial group key handshake retransmit timeout to 500 ms
authorJouni Malinen <j@w1.fi>
Sat, 24 Dec 2011 11:50:59 +0000 (13:50 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 24 Dec 2011 11:50:59 +0000 (13:50 +0200)
The 100 ms timeout on retransmitting group key message can be too short
for stations that are in power save mode or if there is a large number
of association stations. While the retransmission of the EAPOL-Key frame
should allow this to be recovered from, it is useful to avoid
unnecessary frames to save soem CPU and power.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/ap/wpa_auth.c

index 6895a88100281ec9a100a062eeb961b5e7c0d08b..6d7be4ba7c4a6f64723a080896d9d07c7d38bf85 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * hostapd - IEEE 802.11i-2004 / WPA Authenticator
- * Copyright (c) 2004-2009, Jouni Malinen <j@w1.fi>
+ * IEEE 802.11 RSN / WPA Authenticator
+ * Copyright (c) 2004-2011, Jouni Malinen <j@w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -52,6 +52,7 @@ static const u32 dot11RSNAConfigGroupUpdateCount = 4;
 static const u32 dot11RSNAConfigPairwiseUpdateCount = 4;
 static const u32 eapol_key_timeout_first = 100; /* ms */
 static const u32 eapol_key_timeout_subseq = 1000; /* ms */
+static const u32 eapol_key_timeout_first_group = 500; /* ms */
 
 /* TODO: make these configurable */
 static const int dot11RSNAConfigPMKLifetime = 43200;
@@ -1336,7 +1337,8 @@ static void wpa_send_eapol(struct wpa_authenticator *wpa_auth,
 
        ctr = pairwise ? sm->TimeoutCtr : sm->GTimeoutCtr;
        if (ctr == 1 && wpa_auth->conf.tx_status)
-               timeout_ms = eapol_key_timeout_first;
+               timeout_ms = pairwise ? eapol_key_timeout_first :
+                       eapol_key_timeout_first_group;
        else
                timeout_ms = eapol_key_timeout_subseq;
        if (pairwise && ctr == 1 && !(key_info & WPA_KEY_INFO_MIC))