policy: abort kick process for missing candidate
authorDavid Bauer <mail@david-bauer.net>
Thu, 5 May 2022 21:42:01 +0000 (23:42 +0200)
committerDavid Bauer <mail@david-bauer.net>
Thu, 5 May 2022 21:42:04 +0000 (23:42 +0200)
Don't continue the kick process in case no candidate is found.

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

index 43becc1d690434eb92b01acdd949a3b3b848a00d..a7efc06342794a59eeb71aa78ef64c59871542fb 100644 (file)
--- a/policy.c
+++ b/policy.c
@@ -361,8 +361,10 @@ usteer_roam_trigger_sm(struct usteer_local_node *ln, struct sta_info *si)
        case ROAM_TRIGGER_SCAN_DONE:
                candidate = usteer_roam_sm_found_better_node(si, &ev, ROAM_TRIGGER_SCAN_DONE);
                /* Kick back in case no better node is found */
-               if (!candidate)
+               if (!candidate) {
                        usteer_roam_set_state(si, ROAM_TRIGGER_IDLE, &ev);
+                       break;
+               }
 
                usteer_ubus_bss_transition_request(si, 1, false, false, 100, candidate->node);
                si->kick_time = current_time + config.roam_kick_delay;