From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH] station: fix unintended netconfig_reset pre-roaming
Date: Fri, 20 Oct 2023 05:50:21 -0700 [thread overview]
Message-ID: <20231020125021.107671-1-prestwoj@gmail.com> (raw)
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
next reply other threads:[~2023-10-20 12:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 12:50 James Prestwood [this message]
2023-10-20 15:23 ` [PATCH] station: fix unintended netconfig_reset pre-roaming Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231020125021.107671-1-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).