policy: only select candidates with better load
authorDavid Bauer <mail@david-bauer.net>
Tue, 21 Dec 2021 12:24:14 +0000 (13:24 +0100)
committerDavid Bauer <mail@david-bauer.net>
Sun, 9 Jan 2022 01:01:05 +0000 (02:01 +0100)
When kicking clients due to high channel load, explicitly only select
new candidates in case their channel load is an improvement over the
current node.

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

index 95c2843fed0c459d86e6ba6dfe16d049fcd2bc44..4ed85a16e0b3f154bf2c650bc4033017756b9c15 100644 (file)
--- a/policy.c
+++ b/policy.c
@@ -454,7 +454,7 @@ usteer_local_node_kick(struct usteer_local_node *ln)
                if (is_more_kickable(kick1, si))
                        kick1 = si;
 
-               tmp = find_better_candidate(si, NULL, 0);
+               tmp = find_better_candidate(si, NULL, (1 << UEV_SELECT_REASON_LOAD));
                if (!tmp)
                        continue;