policy: fix incurrect handling of scan-requests with disabled timeout
authorDavid Bauer <mail@david-bauer.net>
Sun, 23 Jan 2022 16:27:09 +0000 (17:27 +0100)
committerDavid Bauer <mail@david-bauer.net>
Sun, 23 Jan 2022 19:49:40 +0000 (20:49 +0100)
The logic guarding entering of the SCAN state of the roam state-machine
was incorrect in case the scan-timeout was not enabled.

Signed-off-by: David Bauer <mail@david-bauer.net>
policy.c

index 47a720f8299b1c549b29dbf34cd4edf34eeed519..67c9c75be2b255302b8cb445fea09dc10d998c4e 100644 (file)
--- a/policy.c
+++ b/policy.c
@@ -276,7 +276,7 @@ static void
 usteer_roam_sm_start_scan(struct sta_info *si, struct uevent *ev)
 {
        /* Start scanning in case we are not timeout-constrained or timeout has expired */
-       if (config.roam_scan_timeout && 
+       if (!config.roam_scan_timeout ||
            current_time > si->roam_scan_timeout_start + config.roam_scan_timeout) {
                usteer_roam_set_state(si, ROAM_TRIGGER_SCAN, ev);
                return;