diff options
author | Jouni Malinen <j@w1.fi> | 2010-03-30 02:35:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-31 14:46:42 -0400 |
commit | ecbcd3243651ae8ac2b73a96c320992a4cf01c5b (patch) | |
tree | 6bdb7da8ea5bdbffca4eb9246162e84dbc6b2b67 /net/mac80211 | |
parent | e69e95dbecfb73f76765cdd16dadc6219a9068e3 (diff) |
mac80211: Fix BIP to be used only with group-addressed frames
BIP (part of IEEE 802.11w) is only supposed to be used with
group-addressed frames. We ended up picking it as a default mechanism
for every management whenever we did not have a STA entry for the
destination (e.g., for Probe Response to a STA that is not
associated). While the extra MMIE in the end of management frames
should not break frames completed in most cases, there is no point in
doing this. Fix key selection to pick the default management key only
if the frame is sent to multicast/broadcast address and the frame is a
robust management frame.
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/tx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 08e1f17a4226..350096afe79a 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -513,6 +513,8 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx) | |||
513 | else if (tx->sta && (key = rcu_dereference(tx->sta->key))) | 513 | else if (tx->sta && (key = rcu_dereference(tx->sta->key))) |
514 | tx->key = key; | 514 | tx->key = key; |
515 | else if (ieee80211_is_mgmt(hdr->frame_control) && | 515 | else if (ieee80211_is_mgmt(hdr->frame_control) && |
516 | is_multicast_ether_addr(hdr->addr1) && | ||
517 | ieee80211_is_robust_mgmt_frame(hdr) && | ||
516 | (key = rcu_dereference(tx->sdata->default_mgmt_key))) | 518 | (key = rcu_dereference(tx->sdata->default_mgmt_key))) |
517 | tx->key = key; | 519 | tx->key = key; |
518 | else if ((key = rcu_dereference(tx->sdata->default_key))) | 520 | else if ((key = rcu_dereference(tx->sdata->default_key))) |