]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Allow last configured Key ID for TK to be fetched from wpa_supplicant
authorJouni Malinen <j@w1.fi>
Mon, 23 Mar 2020 09:22:26 +0000 (11:22 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 23 Mar 2020 09:47:31 +0000 (11:47 +0200)
"GET last_tk_key_idx" can now be used in testing build to determine
which was the last configured Key ID for the pairwise key.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/ctrl_iface.c

index 0c79d5257f15212caf849a8e84ae51b9cd2baa72..e140a3e382a5283a0d02cade6ba1f1755d5a38de 100644 (file)
@@ -919,6 +919,8 @@ static int wpa_supplicant_ctrl_iface_get(struct wpa_supplicant *wpa_s,
                return wpa_snprintf_hex(buf, buflen,
                                        wpa_sm_get_anonce(wpa_s->wpa),
                                        WPA_NONCE_LEN);
+       } else if (os_strcasecmp(cmd, "last_tk_key_idx") == 0) {
+               res = os_snprintf(buf, buflen, "%d", wpa_s->last_tk_key_idx);
 #endif /* CONFIG_TESTING_OPTIONS */
        } else {
                res = wpa_config_get_value(cmd, wpa_s->conf, buf, buflen);