From: Denis Kenzior <denkenz@gmail.com>
To: James Prestwood <prestwoj@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 3/8] station: add handling for new NETCONFIG state
Date: Thu, 4 Jan 2024 12:55:33 -0600 [thread overview]
Message-ID: <a0fbeeb4-f53a-4afc-aff3-8731ec914e71@gmail.com> (raw)
In-Reply-To: <ee118809-a4a5-410b-b552-bdb1ad2cf347@gmail.com>
Hi James,
>> Another weirdness is that I think we're sending the d-bus reply after
>> connecting to the AP, but before netconfig runs.
> Probably this as well... But I'm not sure we can really send it after netconfig
> unless we want to add a timeout error or something. If netconfig takes a long
We already should be disconnecting if netconfig fails. It is part of the
NETCONFIG_EVENT_FAILED handling this patch was touching actually. I'm not sure
how this was tested exactly, but Andrew was pretty adamant that we should be
doing so and I thought his arguments were compelling enough.
> time DBus will be unhappy. IMO netconfig is somewhat of a special case in this
> regard, and consumers of the API should be waiting on the connected state, not
> only the DBus method return.
netconfig should take a max of a few seconds under normal circumstances.
Capping the DHCP time might make sense anyway and I think there are even some
TODO items inside ell/netconfig.c about this.
Anyhow, this is a smaller issue compared to the one above.
>>> @@ -2043,8 +2044,9 @@ static void station_netconfig_event_handler(enum
>>> netconfig_event event,
>>> dbus_pending_reply(&station->connect_pending, reply);
>>> }
>>> - if (L_IN_SET(station->state, STATION_STATE_CONNECTING,
>>> - STATION_STATE_CONNECTING_AUTO))
>>> + if (L_IN_SET(station->state, STATION_STATE_NETCONFIG,
>>> + STATION_STATE_ROAMING, STATION_STATE_FT_ROAMING,
>>> + STATION_STATE_FW_ROAMING))
>>
>> I understand why NETCONFIG state is in the set, but why the others?
> This was because if we are roaming and netconfig fails for some reason we want
> to disconnect, right?
Well, AFAIK, the original intent of this piece was to discard secrets if the
initial connection failed. This is now covered by the NETCONFIG state which is
roughly equivalent to CONNECTING.
The addition of roaming states modifies the original intent. Hence why I'm
wondering why this is being added?
>> Also, shouldn't this also cover the roaming states? And do we still need this
>> check given wiphy_work? Does netconfig use wiphy work to make sure nothing
>> tries to scan or go off-channel?
> Yes, we shouldn't scan/offchannel while roaming. And no netconfig doesn't uses
> the wiphy queue, but it really should.
>>
>>> return dbus_error_busy(message);
>>> if (!l_dbus_message_get_arguments(message, "aq", &iter))
> So sounds like I opened up a can of worms here :) We only noticed these issues
> cropping up recently because of extended server upgrade times, i.e. the DHCP
Yep, there's always going to be nasty corner cases to deal with. I suspect your
earlier change to re-start netconfig exposed some of these inconsistencies as well.
> server was down for a long time. Clients roamed and if they didn't have the
> recent changes to restart netconfig they'd be stuck connected without an IP. I
Hence why I think it is better to treat this as an initial connection failure
rather than pretending that we roamed and dealing with the consequences.
> then noticed some of these other limitations now, but at least currently being
> unable to roam is better than having no IP and requiring physical attention.
Regards,
-Denis
next prev parent reply other threads:[~2024-01-04 18:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 18:46 [PATCH 1/8] station: handle netconfig after roaming for FW roams James Prestwood
2024-01-03 18:46 ` [PATCH 2/8] station: add additional internal state, STATION_STATE_NETCONFIG James Prestwood
2024-01-03 18:46 ` [PATCH 3/8] station: add handling for new NETCONFIG state James Prestwood
2024-01-04 18:14 ` Denis Kenzior
2024-01-04 18:31 ` James Prestwood
2024-01-04 18:55 ` Denis Kenzior [this message]
2024-01-04 19:55 ` James Prestwood
2024-01-04 21:01 ` Denis Kenzior
2024-01-03 18:46 ` [PATCH 4/8] station: add debug events for internal states James Prestwood
2024-01-04 17:57 ` Denis Kenzior
2024-01-03 18:46 ` [PATCH 5/8] auto-t: update roam test to use new debug events James Prestwood
2024-01-04 17:58 ` Denis Kenzior
2024-01-03 18:46 ` [PATCH 6/8] auto-t: add test for roaming + netconfig James Prestwood
2024-01-03 18:46 ` [PATCH 7/8] auto-t: improve failure handling in testPSK-roam James Prestwood
2024-01-04 18:00 ` Denis Kenzior
2024-01-03 18:46 ` [PATCH 8/8] auto-t: fix random testPSK-roam failure James Prestwood
2024-01-04 18:00 ` Denis Kenzior
2024-01-04 17:56 ` [PATCH 1/8] station: handle netconfig after roaming for FW roams 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=a0fbeeb4-f53a-4afc-aff3-8731ec914e71@gmail.com \
--to=denkenz@gmail.com \
--cc=iwd@lists.linux.dev \
--cc=prestwoj@gmail.com \
/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