From: Denis Kenzior <denkenz@gmail.com>
To: James Prestwood <prestwoj@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 3/3] netdev: Separate connect_failed and disconnected paths
Date: Wed, 15 Nov 2023 13:07:10 -0600 [thread overview]
Message-ID: <09133467-972a-421f-ab9d-01dbd37d1f78@gmail.com> (raw)
In-Reply-To: <196053b2-0bdc-41ca-b309-09680343b079@gmail.com>
Hi James,
On 11/15/23 12:27, James Prestwood wrote:
> Hi Denis,
>
> On 11/14/23 16:05, Denis Kenzior wrote:
>> Commit c59669a366c5 ("netdev: disambiguate between disconnection types")
>> introduced different paths for different types of disconnection
>> notifications from netdev. Formalize this further by having
>> netdev_connect_failed only invoke connect_cb.
>>
>> Disconnections that could be triggered outside of connection
>> related events are now handled on a different code path. For this
>> purpose, netdev_disconnected() is introduced.
>> ---
>> src/netdev.c | 45 +++++++++++++++++++++++++++++++++------------
>> 1 file changed, 33 insertions(+), 12 deletions(-)
>
> LGTM. You may have already thought of this, but I do still think we could have a
> case where an AP could send a deauth during key setting right?. So key setting
> could still succeed but station would get notified of the failure via the netdev
> event (in netdev_disconnect_event), not the connect callback.
>
Yes, it can happen at any time. We have some inconsistencies in how we handle
the corner cases. For example:
- We Authenticate successfully, but AP Deauthenticates us before we Associate.
This is handled in netdev_deauthenticate_event. See 2bebb4bdc7ee ("netdev:
Handle deauth frames prior to association"). We treat this as a connect
failure, but I'm no longer sure that is right.
- We associate and handshake successfully, but AP decides to deauthenticate us
prior to setting keys, or setting station. Pretty strange case, but should our
connection throttling logic apply? Today we treat this case as a connection
failure for initial connections, and don't handle it at all for the roaming
case. This is what is happening in Alvin's case.
- Firmware / kernel can deauthenticate us at any point. Kernel probably doesn't
actually do this, but the firmware can? How should we handle these?
Also, I think we might still have some problems when we connect / roam
successfully but get disconnected prior to netconfig finishing. We should audit
the code and make sure we're consistent. For example, are d-bus method returns
and state transitions generated at the right time?
Regards,
-Denis
next prev parent reply other threads:[~2023-11-15 19:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 0:05 [PATCH 1/3] netdev: Remove improper use of netdev_connect_failed Denis Kenzior
2023-11-15 0:05 ` [PATCH 2/3] netdev: Simplify netdev_auth_cb error logic Denis Kenzior
2023-11-15 0:05 ` [PATCH 3/3] netdev: Separate connect_failed and disconnected paths Denis Kenzior
2023-11-15 18:27 ` James Prestwood
2023-11-15 19:07 ` Denis Kenzior [this message]
2023-11-15 19:07 ` [PATCH 1/3] netdev: Remove improper use of netdev_connect_failed 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=09133467-972a-421f-ab9d-01dbd37d1f78@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