]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HS 2.0R2: Fix temporary network disabling in Deauth Req case
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 27 Feb 2014 22:29:34 +0000 (00:29 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 27 Feb 2014 22:29:34 +0000 (00:29 +0200)
Commits 7ef6947993d4b09dea6797b96f34dbcfed57d90e and
533536d82ac63512c31ff0bae403d437392d34e0 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>
wpa_supplicant/hs20_supplicant.c

index b873c7c15e15b9ae2272a76ad88b9e969b3620fb..b342d5d898b3f5daacecd3f24e1ef12984f00ccf 100644 (file)
@@ -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
                 * support disabling per BSS. */
                if (wpa_s->current_ssid) {
-                       struct os_time now;
-                       os_get_time(&now);
+                       struct os_reltime now;
+                       os_get_reltime(&now);
                        if (now.sec + reauth_delay <=
                            wpa_s->current_ssid->disabled_until.sec)
                                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) {
-               struct os_time now;
-               os_get_time(&now);
+               struct os_reltime now;
+               os_get_reltime(&now);
                if (now.sec + reauth_delay <=
                    wpa_s->current_ssid->disabled_until.sec)
                        return;