public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Marc Bornand <dev.mbornand@systemb.ch>
Cc: linux-wireless@vger.kernel.org,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kalle Valo <kvalo@kernel.org>, Yohan Prod'homme <kernel@zoddo.fr>,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] Set ssid when authenticating
Date: Mon, 13 Feb 2023 18:37:36 +0100	[thread overview]
Message-ID: <3a9e70f9fe5ac0724730cb445b593fdb7eeeaae9.camel@sipsolutions.net> (raw)
In-Reply-To: <NTBtzDurDf0W90JuEPzaHfxCYkWzyZ5jjPwcy6LpqebS6S1NekVcfBU3sNWczfvhHEJGOSyzQrb40UfSIK8AFZpd71MExKldK7EFnMkkdUk=@systemb.ch>

Hi,

As an aside - there's little point in encrypting the mail sent to me
when you send it also to a public list :) Just makes it more annoying to
use.

> > 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?

It's incorrect in that this is the wrong place to set it.

I don't have a strong feeling about whether it _should_ be set, but I
clearly assumed that it is indeed set ...

> > > 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()?

There's the BSS, or multiple pointers for multi-link.

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

In multi-link? Yes, I don't think we actively enforce that wpa_s does
that, but we'd probably fail to connect to the AP if that weren't the
case. So yeah. Maybe we should check it in assoc.

Here I think you can safely just pick any of the BSSes and look at the
SSID. Really we could even do the same in the nl80211 code, but it's
probably easier to fill in the ssid when we already have it anyway.

In the connect case it might be needed to fill it in earlier for use by
the SME state machine, not sure.

johannes

  reply	other threads:[~2023-02-13 17:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13 10:55 [PATCH v2] Set ssid when authenticating Marc Bornand
2023-02-13 11:01 ` Johannes Berg
2023-02-13 17:32   ` Marc Bornand
2023-02-13 17:37     ` Johannes Berg [this message]
2023-02-13 19:04       ` Marc Bornand
2023-02-13 19:10         ` Conor Dooley

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=3a9e70f9fe5ac0724730cb445b593fdb7eeeaae9.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=davem@davemloft.net \
    --cc=dev.mbornand@systemb.ch \
    --cc=edumazet@google.com \
    --cc=kernel@zoddo.fr \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox