All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jouni Malinen <jouni@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/8] mac80211: Allow AUTH_DATA to be used for FILS
Date: Wed, 26 Oct 2016 07:30:00 +0200	[thread overview]
Message-ID: <1477459800.4059.1.camel@sipsolutions.net> (raw)
In-Reply-To: <1477435357-8495-3-git-send-email-jouni@qca.qualcomm.com>


>  	if (req->auth_data_len >= 4) {
> -		__le16 *pos = (__le16 *) req->auth_data;
> -		auth_data->sae_trans = le16_to_cpu(pos[0]);
> -		auth_data->sae_status = le16_to_cpu(pos[1]);
> +		if (req->auth_type == NL80211_AUTHTYPE_SAE) {
> +			__le16 *pos = (__le16 *) req->auth_data;
> +			auth_data->sae_trans = le16_to_cpu(pos[0]);
> +			auth_data->sae_status = le16_to_cpu(pos[1]);
> +		}
>  		memcpy(auth_data->data, req->auth_data + 4,
>  		       req->auth_data_len - 4);
>  		auth_data->data_len += req->auth_data_len - 4;

Hmm. Do we really want to still skip the first four bytes of the data
userspace passed? That seems a bit strange to me. The docs in nl80211.h
do say it that way now, but should we really include a dummy
Authentication transaction sequence number field?

johannes

  reply	other threads:[~2016-10-26  5:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-25 22:42 [PATCH 0/8] cfg80211/mac80211: Fast Initial Link Setup (IEEE 802.11ai) Jouni Malinen
2016-10-25 22:42 ` [PATCH 1/8] cfg80211: Rename SAE_DATA to more generic AUTH_DATA Jouni Malinen
2016-10-25 22:42 ` [PATCH 2/8] mac80211: Allow AUTH_DATA to be used for FILS Jouni Malinen
2016-10-26  5:30   ` Johannes Berg [this message]
2016-10-26 15:36     ` Malinen, Jouni
2016-10-26 16:10       ` Johannes Berg
2016-10-25 22:42 ` [PATCH 3/8] cfg80211: Add feature flag for Fast Initial Link Setup (FILS) Jouni Malinen
2016-10-25 22:42 ` [PATCH 4/8] cfg80211: Add Fast Initial Link Setup (FILS) auth algs Jouni Malinen

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=1477459800.4059.1.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=jouni@qca.qualcomm.com \
    --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 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.