]> git.ipfire.org Git - thirdparty/hostap.git/commit
tests: Make PMKSA caching tests more robust
authorJouni Malinen <j@w1.fi>
Sun, 18 Jan 2015 13:47:56 +0000 (15:47 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 18 Jan 2015 13:47:56 +0000 (15:47 +0200)
commit7cc9a81f1eac927da50f86315e756839b87954be
tree67fae77d9b36188b919572a55bf49191768c89eb
parentd4155eb78ab10ad2999a096b04c55949b43ce15d
tests: Make PMKSA caching tests more robust

When the STA is forced to disconnect immediately after completion of
4-way handshake, there is a race condition on the AP side between the
reception of EAPOL-Key msg 4/4 and the following Deauthentication frame.
It is possible for the deauthentication notification to be processed
first since that message uses different path from kernel to user space.

If hostapd does not receive EAPOL-Key msg 4/4 prior to deauthentication,
no PMKSA cache entry is added. This race condition was making the test
cases expecting PMKSA caching to work to fail every now and then. Avoid
this issue by waiting for AP-STA-CONNECTED event from hostapd. This
makes sure the PMKSA cache entry gets added on the AP side.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_pmksa_cache.py
tests/hwsim/test_sae.py