aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2020-03-23 09:22:26 (GMT)
committerJouni Malinen <j@w1.fi>2020-03-23 09:47:31 (GMT)
commit41c3f0cd5beeff69cff27fa055f6a5b9b3107cba (patch)
tree1ee06a9e11d5bcb1555637c9922a2a45a95f25c7
parent8b63a581663927bc95587d0065214b153e101f72 (diff)
downloadhostap-41c3f0cd5beeff69cff27fa055f6a5b9b3107cba.zip
hostap-41c3f0cd5beeff69cff27fa055f6a5b9b3107cba.tar.gz
hostap-41c3f0cd5beeff69cff27fa055f6a5b9b3107cba.tar.bz2
Allow last configured Key ID for TK to be fetched from wpa_supplicant
"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>
-rw-r--r--wpa_supplicant/ctrl_iface.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 0c79d52..e140a3e 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -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);