From bee2caf184ccaa324e288ac282bc135405315e2d Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 25 Oct 2021 14:52:59 +0200 Subject: [PATCH] sta: schedule sta_info timeout on creation The codes looks to have a race-condition, where disconnected sta_infos are created without scheduling a timeout. As sta_infos are not connected by default, schedule the timeout upon sta_info creation. Fixes spurious spamming of "Refuse to add an already expired station entry" on remote nodes. Signed-off-by: David Bauer --- sta.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sta.c b/sta.c index 959cff5..54bcaeb 100644 --- a/sta.c +++ b/sta.c @@ -104,6 +104,10 @@ usteer_sta_info_get(struct sta *sta, struct usteer_node *node, bool *create) si->created = current_time; *create = true; + /* Node is by default not connected. */ + si->connected = STA_NOT_CONNECTED; + usteer_sta_info_update_timeout(si, config.local_sta_timeout); + return si; } -- 2.30.2