All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex@autistici.org>
To: Marek Lindner <lindner_marek@yahoo.de>
Cc: linux-wireless@vger.kernel.org,
	Johannes Berg <johannes@sipsolutions.net>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH] mac80211: In IBSS the DA field of auth frames is different from BSSID
Date: Sat, 16 Jun 2012 18:52:40 +0200	[thread overview]
Message-ID: <20120616165239.GA6607@ritirata.org> (raw)
In-Reply-To: <1339865405-10787-1-git-send-email-ordex@autistici.org>

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

Sorry John and the others,

this patchset is a mistake.
It has already been merged. I wrongly sent it over the ml again.

Cheers,


On Sat, Jun 16, 2012 at 06:50:01PM +0200, Antonio Quartulli wrote:
> In case of authentication frame exchange between two IBSS STAs, the
> DA field must contain the destinatioin address (instead of the BSSID).
> 
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
>  net/mac80211/ibss.c        |    2 +-
>  net/mac80211/ieee80211_i.h |    2 +-
>  net/mac80211/util.c        |    6 +++---
>  net/mac80211/work.c        |    5 +++--
>  4 files changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
> index b4c3031..4345e94 100644
> --- a/net/mac80211/ibss.c
> +++ b/net/mac80211/ibss.c
> @@ -57,7 +57,7 @@ static void ieee80211_rx_mgmt_auth_ibss(struct ieee80211_sub_if_data *sdata,
>  	 * has actually implemented this.
>  	 */
>  	if (auth_alg == WLAN_AUTH_OPEN && auth_transaction == 1)
> -		ieee80211_send_auth(sdata, 2, WLAN_AUTH_OPEN, NULL, 0,
> +		ieee80211_send_auth(sdata, 2, WLAN_AUTH_OPEN, NULL, 0, mgmt->sa,
>  				    sdata->u.ibss.bssid, NULL, 0, 0);
>  }
>  
> diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
> index 2f0642d..ca6486b 100644
> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -1396,7 +1396,7 @@ void ieee80211_add_pending_skbs_fn(struct ieee80211_local *local,
>  void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
>  			 u16 transaction, u16 auth_alg,
>  			 u8 *extra, size_t extra_len, const u8 *bssid,
> -			 const u8 *key, u8 key_len, u8 key_idx);
> +			 const u8 *da, const u8 *key, u8 key_len, u8 key_idx);
>  int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
>  			     const u8 *ie, size_t ie_len,
>  			     enum ieee80211_band band, u32 rate_mask,
> diff --git a/net/mac80211/util.c b/net/mac80211/util.c
> index 9919892..30d72e2 100644
> --- a/net/mac80211/util.c
> +++ b/net/mac80211/util.c
> @@ -862,8 +862,8 @@ u32 ieee80211_mandatory_rates(struct ieee80211_local *local,
>  
>  void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
>  			 u16 transaction, u16 auth_alg,
> -			 u8 *extra, size_t extra_len, const u8 *bssid,
> -			 const u8 *key, u8 key_len, u8 key_idx)
> +			 u8 *extra, size_t extra_len, const u8 *da,
> +			 const u8 *bssid, const u8 *key, u8 key_len, u8 key_idx)
>  {
>  	struct ieee80211_local *local = sdata->local;
>  	struct sk_buff *skb;
> @@ -881,7 +881,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
>  	memset(mgmt, 0, 24 + 6);
>  	mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
>  					  IEEE80211_STYPE_AUTH);
> -	memcpy(mgmt->da, bssid, ETH_ALEN);
> +	memcpy(mgmt->da, da, ETH_ALEN);
>  	memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
>  	memcpy(mgmt->bssid, bssid, ETH_ALEN);
>  	mgmt->u.auth.auth_alg = cpu_to_le16(auth_alg);
> diff --git a/net/mac80211/work.c b/net/mac80211/work.c
> index c6dd01a..0a1a176 100644
> --- a/net/mac80211/work.c
> +++ b/net/mac80211/work.c
> @@ -480,7 +480,8 @@ ieee80211_authenticate(struct ieee80211_work *wk)
>  	       sdata->name, wk->filter_ta, wk->probe_auth.tries);
>  
>  	ieee80211_send_auth(sdata, 1, wk->probe_auth.algorithm, wk->ie,
> -			    wk->ie_len, wk->filter_ta, NULL, 0, 0);
> +			    wk->ie_len, wk->filter_ta, wk->filter_ta, NULL, 0,
> +			    0);
>  	wk->probe_auth.transaction = 2;
>  
>  	wk->timeout = jiffies + IEEE80211_AUTH_TIMEOUT;
> @@ -598,7 +599,7 @@ static void ieee80211_auth_challenge(struct ieee80211_work *wk,
>  		return;
>  	ieee80211_send_auth(sdata, 3, wk->probe_auth.algorithm,
>  			    elems.challenge - 2, elems.challenge_len + 2,
> -			    wk->filter_ta, wk->probe_auth.key,
> +			    wk->filter_ta, wk->filter_ta, wk->probe_auth.key,
>  			    wk->probe_auth.key_len, wk->probe_auth.key_idx);
>  	wk->probe_auth.transaction = 4;
>  }
> -- 
> 1.7.9.4
> 

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2012-06-16 17:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-16 16:50 [PATCH] mac80211: In IBSS the DA field of auth frames is different from BSSID Antonio Quartulli
2012-06-16 16:50 ` [PATCH] mac80211: remove useless DA checking in ieee80211_rx_mgmt_probe_resp() Antonio Quartulli
2012-06-16 16:50 ` [PATCH] mac80211: add a 2-way Authentication challenge to IBSS mode Antonio Quartulli
2012-06-16 16:50 ` [PATCH] mac80211: in IBSS use the Auth frame to trigger STA reinsertion Antonio Quartulli
2012-06-16 16:50 ` [PATCH] cfg80211/mac80211: userspace peer authorization in IBSS Antonio Quartulli
2012-06-16 16:52 ` Antonio Quartulli [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-09 18:43 [PATCH] mac80211: In IBSS the DA field of auth frames is different from BSSID Antonio Quartulli

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=20120616165239.GA6607@ritirata.org \
    --to=ordex@autistici.org \
    --cc=johannes@sipsolutions.net \
    --cc=lindner_marek@yahoo.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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.