From 70e3a43475fee883f7eb5cd933d1ddb0e2549ce5 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 11 Jan 2023 12:15:39 -0800 Subject: [PATCH] netdev: unset ptk_installed flag for TK When the TK is installed the 'ptk_installed' flag was never set to zero. For initial associations this was fine (already zero) but for rekeys the flag needs to be unset so try_handshake_complete knows if the key was installed. This is consistent with how gtk/igtk keys work as well. --- src/netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/netdev.c b/src/netdev.c index cda8d183..fc8a2afa 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -2024,6 +2024,8 @@ static void netdev_set_tk(struct handshake_state *hs, uint8_t key_index, const uint8_t *addr = netdev_choose_key_address(nhs); int err; + nhs->ptk_installed = false; + /* * WPA1 does the group handshake after the 4-way finishes so we can't * rely on the gtk/igtk being set immediately after the ptk. Since