aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Wetzel <alexander@wetzel-home.de>2020-03-23 18:42:28 (GMT)
committerJouni Malinen <j@w1.fi>2020-03-25 22:33:17 (GMT)
commit8ca6f924d6665427f50a1c81c7cc7835af2e1684 (patch)
tree822e66635e6cb27970a54316aedcc5a8085e2650
parentff543409055888403f79c8098bba57053d1baf97 (diff)
downloadhostap-8ca6f924d6665427f50a1c81c7cc7835af2e1684.zip
hostap-8ca6f924d6665427f50a1c81c7cc7835af2e1684.tar.gz
hostap-8ca6f924d6665427f50a1c81c7cc7835af2e1684.tar.bz2
STA: Fix wpa_clear_keys() PTK key deletion logic
We have to delete PTK keys when either BIT(0) or BIT(15) are zero and not only when both are zero. Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
-rw-r--r--wpa_supplicant/wpa_supplicant.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index f11bac0..a01a3e7 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -749,7 +749,7 @@ void wpa_clear_keys(struct wpa_supplicant *wpa_s, const u8 *addr)
NULL, 0, KEY_FLAG_GROUP);
}
/* Pairwise Key ID 1 for Extended Key ID is tracked in bit 15 */
- if (!(wpa_s->keys_cleared & (BIT(0) | BIT(15))) && addr &&
+ if (~wpa_s->keys_cleared & (BIT(0) | BIT(15)) && addr &&
!is_zero_ether_addr(addr)) {
if (!(wpa_s->keys_cleared & BIT(0)))
wpa_drv_set_key(wpa_s, WPA_ALG_NONE, addr, 0, 0, NULL,