aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2012-01-09 13:43:06 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-24 14:08:39 -0500
commitefa6a09db6d6c27557fb55299b9835b45b968eae (patch)
tree6ce9d715266bd618c35e1dc8bff7087ae9badae5 /net
parente9980e6d20a5c4d3f52359142ab3569171759a5b (diff)
mac80211: In IBSS the DA field of auth frames is different from BSSID
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>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ibss.c2
-rw-r--r--net/mac80211/ieee80211_i.h2
-rw-r--r--net/mac80211/util.c6
-rw-r--r--net/mac80211/work.c5
4 files changed, 8 insertions, 7 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index b4c30318e22b..4345e9449d7c 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,
57 * has actually implemented this. 57 * has actually implemented this.
58 */ 58 */
59 if (auth_alg == WLAN_AUTH_OPEN && auth_transaction == 1) 59 if (auth_alg == WLAN_AUTH_OPEN && auth_transaction == 1)
60 ieee80211_send_auth(sdata, 2, WLAN_AUTH_OPEN, NULL, 0, 60 ieee80211_send_auth(sdata, 2, WLAN_AUTH_OPEN, NULL, 0, mgmt->sa,
61 sdata->u.ibss.bssid, NULL, 0, 0); 61 sdata->u.ibss.bssid, NULL, 0, 0);
62} 62}
63 63
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 2f0642d9e154..ca6486b941b6 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,
1396void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, 1396void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
1397 u16 transaction, u16 auth_alg, 1397 u16 transaction, u16 auth_alg,
1398 u8 *extra, size_t extra_len, const u8 *bssid, 1398 u8 *extra, size_t extra_len, const u8 *bssid,
1399 const u8 *key, u8 key_len, u8 key_idx); 1399 const u8 *da, const u8 *key, u8 key_len, u8 key_idx);
1400int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, 1400int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
1401 const u8 *ie, size_t ie_len, 1401 const u8 *ie, size_t ie_len,
1402 enum ieee80211_band band, u32 rate_mask, 1402 enum ieee80211_band band, u32 rate_mask,
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 9919892575f4..30d72e2af7ce 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -862,8 +862,8 @@ u32 ieee80211_mandatory_rates(struct ieee80211_local *local,
862 862
863void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, 863void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
864 u16 transaction, u16 auth_alg, 864 u16 transaction, u16 auth_alg,
865 u8 *extra, size_t extra_len, const u8 *bssid, 865 u8 *extra, size_t extra_len, const u8 *da,
866 const u8 *key, u8 key_len, u8 key_idx) 866 const u8 *bssid, const u8 *key, u8 key_len, u8 key_idx)
867{ 867{
868 struct ieee80211_local *local = sdata->local; 868 struct ieee80211_local *local = sdata->local;
869 struct sk_buff *skb; 869 struct sk_buff *skb;
@@ -881,7 +881,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
881 memset(mgmt, 0, 24 + 6); 881 memset(mgmt, 0, 24 + 6);
882 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | 882 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
883 IEEE80211_STYPE_AUTH); 883 IEEE80211_STYPE_AUTH);
884 memcpy(mgmt->da, bssid, ETH_ALEN); 884 memcpy(mgmt->da, da, ETH_ALEN);
885 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); 885 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
886 memcpy(mgmt->bssid, bssid, ETH_ALEN); 886 memcpy(mgmt->bssid, bssid, ETH_ALEN);
887 mgmt->u.auth.auth_alg = cpu_to_le16(auth_alg); 887 mgmt->u.auth.auth_alg = cpu_to_le16(auth_alg);
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index c6dd01a05291..0a1a176fbe91 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -480,7 +480,8 @@ ieee80211_authenticate(struct ieee80211_work *wk)
480 sdata->name, wk->filter_ta, wk->probe_auth.tries); 480 sdata->name, wk->filter_ta, wk->probe_auth.tries);
481 481
482 ieee80211_send_auth(sdata, 1, wk->probe_auth.algorithm, wk->ie, 482 ieee80211_send_auth(sdata, 1, wk->probe_auth.algorithm, wk->ie,
483 wk->ie_len, wk->filter_ta, NULL, 0, 0); 483 wk->ie_len, wk->filter_ta, wk->filter_ta, NULL, 0,
484 0);
484 wk->probe_auth.transaction = 2; 485 wk->probe_auth.transaction = 2;
485 486
486 wk->timeout = jiffies + IEEE80211_AUTH_TIMEOUT; 487 wk->timeout = jiffies + IEEE80211_AUTH_TIMEOUT;
@@ -598,7 +599,7 @@ static void ieee80211_auth_challenge(struct ieee80211_work *wk,
598 return; 599 return;
599 ieee80211_send_auth(sdata, 3, wk->probe_auth.algorithm, 600 ieee80211_send_auth(sdata, 3, wk->probe_auth.algorithm,
600 elems.challenge - 2, elems.challenge_len + 2, 601 elems.challenge - 2, elems.challenge_len + 2,
601 wk->filter_ta, wk->probe_auth.key, 602 wk->filter_ta, wk->filter_ta, wk->probe_auth.key,
602 wk->probe_auth.key_len, wk->probe_auth.key_idx); 603 wk->probe_auth.key_len, wk->probe_auth.key_idx);
603 wk->probe_auth.transaction = 4; 604 wk->probe_auth.transaction = 4;
604} 605}