path: root/wlantest/rx_data.c
diff options
authorJouni Malinen <jouni@qca.qualcomm.com>2011-11-14 20:33:26 (GMT)
committerJouni Malinen <j@w1.fi>2011-11-14 20:36:02 (GMT)
commitd0b251d2e84611b80db7d00c7b12a3178043f329 (patch)
tree163dab3933fcac706ff1c9e8355573a0477d71af /wlantest/rx_data.c
parentadc33680e33ff22781bed803d79f9c0410ee5473 (diff)
wlantest: Fix handling of PTK rekeying
Use a temporary PTK buffer during 4-way handshake when rekeying PTK so that the new EAPOL-Key frame MIC values are checked against the new PTK and frames are decrypted using the old PTK. Take the new PTK into use once msg 4/4 is processed and clear RSC counters at that point (including moving of RSC update to avoid setting RSC based on the msg 4/4). In addition, add a workaround to handle supplicant implementations that set Secure bit to one during PTK rekeying 4-way handshake in msg 2/4. This was previously assumed to be msg 4/4, but the key data contents can be used to figure out whether this is msg 2/4 even if the Secure bit is set to one. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wlantest/rx_data.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/wlantest/rx_data.c b/wlantest/rx_data.c
index 36b0459..b7f1a89 100644
--- a/wlantest/rx_data.c
+++ b/wlantest/rx_data.c
@@ -342,9 +342,9 @@ skip_replay_det:
const u8 *peer_addr = NULL;
if (!(fc & (WLAN_FC_FROMDS | WLAN_FC_TODS)))
peer_addr = hdr->addr1;
+ os_memcpy(rsc, pn, 6);
rx_data_process(wt, bss->bssid, sta->addr, dst, src, decrypted,
dlen, 1, peer_addr);
- os_memcpy(rsc, pn, 6);
write_pcap_decrypted(wt, (const u8 *) hdr, 24 + (qos ? 2 : 0),
decrypted, dlen);