Re: [PATCH v2] Set ssid when authenticating

From: Marc Bornand
Date: Mon Feb 13 2023 - 12:33:17 EST


On Monday, February 13th, 2023 at 12:01, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
>
>
> On Mon, 2023-02-13 at 10:55 +0000, Marc Bornand wrote:
>
> > changes since v1:
> > - add some informations
> > - test it on wireless-2023-01-18 tag
> > - no real code change
> >
> > When a connexion was established without going through
> > NL80211_CMD_CONNECT, the ssid was never set in the wireless_dev struct.
> > Now we set it during when an NL80211_CMD_AUTHENTICATE is issued.
>
>
> This is incorrect, doing an authentication doesn't require doing an
> association afterwards, and doesn't necessarily imply any state change
> in the kernel.

So is it intended behavior that the ssid in wireless_dev is not set
or is there a place were this state change should happen?

>
> > alternatives:
> > 1. Do the same but during association and not authentication.
>
>
> Which should probably be done after successful authentication, even in
> the CONNECT command case, which currently does it in cfg80211_connect()
> but I guess that should move to __cfg80211_connect_result().

Is there an existing way to get the ssid in __cfg80211_connect_result()?


>
> > 2. use ieee80211_bss_get_elem in nl80211_send_iface, this would report
> > the right ssid to userspace, but this would not fix the root cause,
> > this alos wa the behavior prior to 7b0a0e3c3a882 when the bug was
> > introduced.
>
>
> That would be OK too but the reason I changed it there (missing the fact
> that it wasn't set) is that we have multiple BSSes with MLO. So it's
> hard to get one to do this with.
>
> johannes

Just a side question do the BSSes all have the same SSID?

Marc