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.
This commit is contained in:
James Prestwood 2023-01-11 12:15:39 -08:00 committed by Denis Kenzior
parent c66e5ce8fc
commit 70e3a43475
1 changed files with 2 additions and 0 deletions

View File

@ -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