]> git.ipfire.org Git - thirdparty/hostap.git/commit - wlantest/rx_eapol.c
wlantest: Fix handling of PTK rekeying
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 14 Nov 2011 20:33:26 +0000 (22:33 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 14 Nov 2011 20:36:02 +0000 (22:36 +0200)
commitd0b251d2e84611b80db7d00c7b12a3178043f329
tree163dab3933fcac706ff1c9e8355573a0477d71af
parentadc33680e33ff22781bed803d79f9c0410ee5473
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>
wlantest/rx_data.c
wlantest/rx_eapol.c
wlantest/wlantest.h