All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: iwd@lists.01.org
Subject: Re: [PATCH 2/2] netdev: Pass a reason code with NETDEV_EVENT_DISCONNECT_BY_*
Date: Tue, 11 May 2021 18:27:53 -0500	[thread overview]
Message-ID: <42f04381-fec4-8a53-5bdc-3eec3ce71716@gmail.com> (raw)
In-Reply-To: <CAOq732LWfdibQg8wsRSAoKYY3WZh3874dbyyV8jv6vmD-N81iA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1696 bytes --]

On 5/11/21 5:57 PM, Andrew Zaborowski wrote:
> On Wed, 12 May 2021 at 00:34, Denis Kenzior <denkenz@gmail.com> wrote:
>> On 5/11/21 4:56 PM, Andrew Zaborowski wrote:
>>> On Tue, 11 May 2021 at 18:36, Denis Kenzior <denkenz@gmail.com> wrote:
>>>> On 5/10/21 5:12 AM, Andrew Zaborowski wrote:
>>>>> Station callbacks expect a reason code (as opposed to status codes) with
>>>>> this event type.  This shouldn't matter a lot because
>>>>> station_disconnect_event() only actually looks at the value during
>>>>
>>>> I'm not sure why station is written this way.  I'm pretty sure that calling
>>>> station_disconnect_event() for NETDEV_EVENT_DISCONNECT_BY_SME() is the wrong
>>>> thing to do.
>>>
>>> That is currently the only use of that function though.
>>
>> No, we have DISCONNECT_BY_AP and DISCONNECT_BY_SME.  DISCONNECT_BY_SME should
>> pretty much imply station_disassociated() should be called since we should never
>> receive this event when we're in the connecting state.
> 
> I wouldn't rely on that, if the kernel doesn't pass
> NL80211_ATTR_DISCONNECTED_BY_AP it could mean that the AP sent
> something that triggered the kernel to disconnect (possibly before

I suppose it might be possible, but wouldn't you treat it as a connect failed 
and not a disconnect_by_sme?  That is what we do if Auth/Assoc times out for 
example.

> handshake complete).  For us we mainly care that we can't use this BSS
> and should try a different one next time.

But we need to make a best attempt to guess as to why it failed.

 From what I gather, in this particular case, the AP just sends a Deauth after 
PTK2/4 packet doesn't pass the MIC check.

Regards,
-Denis

  reply	other threads:[~2021-05-11 23:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10 10:12 [PATCH 1/2] station: Fix autoconnect loops Andrew Zaborowski
2021-05-10 10:12 ` [PATCH 2/2] netdev: Pass a reason code with NETDEV_EVENT_DISCONNECT_BY_* Andrew Zaborowski
2021-05-11 16:36   ` Denis Kenzior
2021-05-11 21:56     ` Andrew Zaborowski
2021-05-11 22:34       ` Denis Kenzior
2021-05-11 22:57         ` Andrew Zaborowski
2021-05-11 23:27           ` Denis Kenzior [this message]
2021-05-11 16:32 ` [PATCH 1/2] station: Fix autoconnect loops James Prestwood
2021-05-11 21:41   ` Andrew Zaborowski

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=42f04381-fec4-8a53-5bdc-3eec3ce71716@gmail.com \
    --to=denkenz@gmail.com \
    --cc=iwd@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.