diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2010-01-22 16:07:59 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-22 16:33:28 -0500 |
commit | f12553ebe045a8a40ab33fa500fb57d10706e226 (patch) | |
tree | 936682b710e2bb6e132a2ec4ecae9c96e64d42ec /net | |
parent | b92f7d30830a319148df2943b7565989494e5ad1 (diff) |
mac80211: add missing key check
ieee80211_tx_h_select_key might decide that a frame
need not be encrypted at all, in which case it will
clear tx->key. In that case it may crash if a key
was previously selected, e.g. as the default key.
This is also due to my patch
"mac80211: move control.hw_key assignment".
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/tx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index da557b0d0114..fcfa988a37a3 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -557,7 +557,7 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx) | |||
557 | break; | 557 | break; |
558 | } | 558 | } |
559 | 559 | ||
560 | if (!skip_hw && | 560 | if (!skip_hw && tx->key && |
561 | tx->key->conf.flags & KEY_FLAG_UPLOADED_TO_HARDWARE) | 561 | tx->key->conf.flags & KEY_FLAG_UPLOADED_TO_HARDWARE) |
562 | info->control.hw_key = &tx->key->conf; | 562 | info->control.hw_key = &tx->key->conf; |
563 | } | 563 | } |