Wireless Daemon for Linux
 help / color / mirror / Atom feed
* [PATCH] station: fix unintended netconfig_reset pre-roaming
@ 2023-10-20 12:50 James Prestwood
  2023-10-20 15:23 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: James Prestwood @ 2023-10-20 12:50 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

Commit 23f0f5717c did not correctly handle the reassociation
case where the state is set from within station_try_next_transition.
If IWD reassociates netconfig will get reset and DHCP will need to
be done over again after the roam. Instead get the state ahead of
station_try_next_transition.
---
 src/station.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/station.c b/src/station.c
index f24b9aca..e18847bc 100644
--- a/src/station.c
+++ b/src/station.c
@@ -2470,6 +2470,7 @@ static void station_transition_start(struct station *station)
 {
 	struct roam_bss *rbss;
 	bool roaming = false;
+	bool connected = (station->state == STATION_STATE_CONNECTED);
 
 	/*
 	 * For each failed attempt pop the BSS leaving the head of the queue
@@ -2498,7 +2499,7 @@ static void station_transition_start(struct station *station)
 	 * still should roam in this case but need to restart netconfig once the
 	 * roam is finished.
 	 */
-	if (station->netconfig && station->state != STATION_STATE_CONNECTED) {
+	if (station->netconfig && !connected) {
 		netconfig_reset(station->netconfig);
 		station->netconfig_after_roam = true;
 	}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-20 15:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-20 12:50 [PATCH] station: fix unintended netconfig_reset pre-roaming James Prestwood
2023-10-20 15:23 ` Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox