Skip to contentSkip to conversation

station: fix unintended netconfig_reset pre-roaming

PATCH Applied James Prestwood 2 participants 2 messages Oct 20, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 station: fix unintended netconfig_reset pre-roaming

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(-)
src/station.c +2 -1
index f24b9aca..e18847bc 100644
@@ -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;
 	}
Signature · 1 line
2.25.1
#1 lore raw

Hi James,

Quoted 8 lines · 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(-)

Applied, thanks.

Regards,
-Denis