Indicate if BIGTK has been set in STATUS output
The new "bigtk_set=1" entry in the control interface STATUS command output indicates that a BIGTK has been successfully configured. This shows that beacon protection has been enabled for the current association. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
42c1a512d9
commit
7436b5b012
4 changed files with 20 additions and 2 deletions
|
@ -2575,6 +2575,13 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
|
||||||
pos += ret;
|
pos += ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wpa_s->bigtk_set) {
|
||||||
|
ret = os_snprintf(pos, end - pos, "bigtk_set=1\n");
|
||||||
|
if (os_snprintf_error(end - pos, ret))
|
||||||
|
return pos - buf;
|
||||||
|
pos += ret;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
/*
|
/*
|
||||||
* Allow using the STATUS command with default behavior, say for debug,
|
* Allow using the STATUS command with default behavior, say for debug,
|
||||||
|
|
|
@ -434,6 +434,7 @@ void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s)
|
||||||
#endif /* CONFIG_SME */
|
#endif /* CONFIG_SME */
|
||||||
|
|
||||||
wpa_s->ssid_verified = false;
|
wpa_s->ssid_verified = false;
|
||||||
|
wpa_s->bigtk_set = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3371,6 +3372,7 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
|
||||||
|
|
||||||
wpa_dbg(wpa_s, MSG_DEBUG, "Association info event");
|
wpa_dbg(wpa_s, MSG_DEBUG, "Association info event");
|
||||||
wpa_s->ssid_verified = false;
|
wpa_s->ssid_verified = false;
|
||||||
|
wpa_s->bigtk_set = false;
|
||||||
#ifdef CONFIG_SAE
|
#ifdef CONFIG_SAE
|
||||||
#ifdef CONFIG_SME
|
#ifdef CONFIG_SME
|
||||||
/* SAE H2E binds the SSID into PT and that verifies the SSID
|
/* SAE H2E binds the SSID into PT and that verifies the SSID
|
||||||
|
|
|
@ -1611,6 +1611,7 @@ struct wpa_supplicant {
|
||||||
#endif /* CONFIG_NAN_USD */
|
#endif /* CONFIG_NAN_USD */
|
||||||
|
|
||||||
bool ssid_verified;
|
bool ssid_verified;
|
||||||
|
bool bigtk_set;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -534,6 +534,8 @@ static int wpa_supplicant_set_key(void *_wpa_s, int link_id, enum wpa_alg alg,
|
||||||
enum key_flag key_flag)
|
enum key_flag key_flag)
|
||||||
{
|
{
|
||||||
struct wpa_supplicant *wpa_s = _wpa_s;
|
struct wpa_supplicant *wpa_s = _wpa_s;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (alg == WPA_ALG_TKIP && key_idx == 0 && key_len == 32) {
|
if (alg == WPA_ALG_TKIP && key_idx == 0 && key_len == 32) {
|
||||||
/* Clear the MIC error counter when setting a new PTK. */
|
/* Clear the MIC error counter when setting a new PTK. */
|
||||||
wpa_s->mic_errors_seen = 0;
|
wpa_s->mic_errors_seen = 0;
|
||||||
|
@ -556,8 +558,14 @@ static int wpa_supplicant_set_key(void *_wpa_s, int link_id, enum wpa_alg alg,
|
||||||
wpa_s->last_tk_len = key_len;
|
wpa_s->last_tk_len = key_len;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_TESTING_OPTIONS */
|
#endif /* CONFIG_TESTING_OPTIONS */
|
||||||
return wpa_drv_set_key(wpa_s, link_id, alg, addr, key_idx, set_tx, seq,
|
|
||||||
seq_len, key, key_len, key_flag);
|
ret = wpa_drv_set_key(wpa_s, link_id, alg, addr, key_idx, set_tx, seq,
|
||||||
|
seq_len, key, key_len, key_flag);
|
||||||
|
if (ret == 0 && (key_idx == 6 || key_idx == 7) &&
|
||||||
|
alg != WPA_ALG_NONE && key_len > 0)
|
||||||
|
wpa_s->bigtk_set = true;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue