From: Will Hawkins <hawkinsw@opentechinstitute.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Will Hawkins <hawkinsw@opentechinitiative.org>,
linux-wireless@vger.kernel.org
Subject: Re: Help tracing NL80211_CMD_AUTHENTICATE as event in IBSS mode
Date: Tue, 26 Jun 2012 12:23:29 -0400 [thread overview]
Message-ID: <4FE9E201.1010903@opentechinstitute.org> (raw)
In-Reply-To: <1340693584.4662.3.camel@jlt3.sipsolutions.net>
On 06/26/2012 02:53 AM, Johannes Berg wrote:
> Hi,
>
>> The documentation for nl80211 says the following about the
>> NL80211_CMD_AUTHENTICATE command:
>> "When used as an event, this reports reception of an Authentication
>> frame in station and IBSS modes when the local MLME processed the
>> frame, i.e., it was for the local STA and was received in correct
>> state."
>>
>> I very much want this to be true for IBSS modes. However, I cannot
>> seem to trace through the source code to confirm that this actually
>> happens. I can easily follow the code for the case when the interface
>> is in station mode but lose the trail for IBSS.
>
> I'm afraid that isn't actually true for IBSS. The event you get there
> will be NL80211_CMD_NEW_STATION.
Thank you for the sanity check! Do you think it's worthwhile to patch
the nl80211.h file to address this?
>
>> As far as I can tell, the only path to nl80211_send_rx_auth (the only
>> place a NL80211_CMD_AUTHENTICATE command is sent to userspace) looks
>> like this:
>> ieee80211_iface_work invokes ieee80211_sta_rx_queued_mgmt to handle
>> queued management packets received on a station interface.
>> ieee80211_sta_rx_queued_mgmt (eventually) invokes
>> cfg80211_send_rx_auth, after the proper handling. Finally,
>> cfg80211_send_rx_auth invokes nl80211_send_rx_auth.
>
> Yes.
>
>
> I think in your case though, what you really want is a NL80211_CMD_FRAME
> event? You register for auth frames, also to prevent mac80211 from
> handling them itself, and then they get diverted to cfg80211_rx_mgmt()
> and on to nl80211_send_mgmt().
Thanks for this, as well. As far as the patch that I submitted, you are
exactly correct. I was only investigating this other method since it
appears that's how wpa_supplicant claims to support IBSS RSN.
wpa_supplicant never actually registers for AUTH frames (through
NL80211_CMD_REGISTER) and relies solely on the NL80211_CMD_AUTHENTICATE
to actually receive copies of those frames.
Thanks again. My forehead was getting sore from all the banging!
Will
>
> johannes
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2012-06-26 16:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-26 4:01 Help tracing NL80211_CMD_AUTHENTICATE as event in IBSS mode Will Hawkins
2012-06-26 6:53 ` Johannes Berg
2012-06-26 16:23 ` Will Hawkins [this message]
2012-06-26 16:41 ` Johannes Berg
2012-06-26 16:44 ` Will Hawkins
2012-06-26 17:03 ` Johannes Berg
2012-06-26 18:55 ` Antonio Quartulli
2012-06-26 18:56 ` Johannes Berg
2012-06-26 19:35 ` Antonio Quartulli
2012-06-26 19:36 ` Johannes Berg
2012-06-26 19:42 ` Nicolas Cavallari
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=4FE9E201.1010903@opentechinstitute.org \
--to=hawkinsw@opentechinstitute.org \
--cc=hawkinsw@opentechinitiative.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@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;
as well as URLs for NNTP newsgroup(s).