diff options
author | Arik Nemtsov <arik@wizery.com> | 2011-11-10 11:35:13 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-11 21:32:51 +0400 |
commit | e0830f71e7b8c2c58031c9692384819943162e9b (patch) | |
tree | 7b7ad69c6f4a2166a463eda9af20ff6e3c2cb989 /net | |
parent | fdacbcda7f21ba684cb4426daed67e23003d8311 (diff) | |
download | linux-e0830f71e7b8c2c58031c9692384819943162e9b.tar.xz |
mac80211: make sure hw_key exists before checking its flags
Fixes a bug introduced in:
commit 077a9154898b374f20555adc3f620cccd02581d6
Author: Arik Nemtsov <arik@wizery.com>
Date: Sun Oct 23 08:21:41 2011 +0200
Reported-by: Arend van Spriel <arend@broadcom.com>
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/wpa.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c index 13efab5bf12a..106e15a4649f 100644 --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c @@ -415,7 +415,8 @@ static int ccmp_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb) memmove(pos, pos + CCMP_HDR_LEN, hdrlen); /* the HW only needs room for the IV, but not the actual IV */ - if (info->control.hw_key->flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE) + if (info->control.hw_key && + (info->control.hw_key->flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE)) return 0; hdr = (struct ieee80211_hdr *) pos; |