mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
HS 2.0R2: Fix temporary network disabling in Deauth Req case
Commits7ef6947993
and533536d82a
added this temporarily disabling case, but those commits were merged in without having been converted to the new os_reltime design used for ssid->disabled_until. Consequently, they ended up disabling the network for 44 years or so too long time (depending on what values the relative timestamp had accummulated so far). Fix this by using relative timestamps consistently. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
cfa57df68d
commit
06c7b7f0b5
@ -885,8 +885,8 @@ void hs20_rx_deauth_imminent_notice(struct wpa_supplicant *wpa_s, u8 code,
|
|||||||
/* TODO: For now, disable full ESS since some drivers may not
|
/* TODO: For now, disable full ESS since some drivers may not
|
||||||
* support disabling per BSS. */
|
* support disabling per BSS. */
|
||||||
if (wpa_s->current_ssid) {
|
if (wpa_s->current_ssid) {
|
||||||
struct os_time now;
|
struct os_reltime now;
|
||||||
os_get_time(&now);
|
os_get_reltime(&now);
|
||||||
if (now.sec + reauth_delay <=
|
if (now.sec + reauth_delay <=
|
||||||
wpa_s->current_ssid->disabled_until.sec)
|
wpa_s->current_ssid->disabled_until.sec)
|
||||||
return;
|
return;
|
||||||
@ -898,8 +898,8 @@ void hs20_rx_deauth_imminent_notice(struct wpa_supplicant *wpa_s, u8 code,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (code == HS20_DEAUTH_REASON_CODE_ESS && wpa_s->current_ssid) {
|
if (code == HS20_DEAUTH_REASON_CODE_ESS && wpa_s->current_ssid) {
|
||||||
struct os_time now;
|
struct os_reltime now;
|
||||||
os_get_time(&now);
|
os_get_reltime(&now);
|
||||||
if (now.sec + reauth_delay <=
|
if (now.sec + reauth_delay <=
|
||||||
wpa_s->current_ssid->disabled_until.sec)
|
wpa_s->current_ssid->disabled_until.sec)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user