提交 e0830f71 编写于 作者: A Arik Nemtsov 提交者: John W. Linville

mac80211: make sure hw_key exists before checking its flags

Fixes a bug introduced in:

commit 077a9154
Author: Arik Nemtsov <arik@wizery.com>
Date:   Sun Oct 23 08:21:41 2011 +0200
Reported-by: NArend van Spriel <arend@broadcom.com>
Reported-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NArik Nemtsov <arik@wizery.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 fdacbcda
...@@ -415,7 +415,8 @@ static int ccmp_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb) ...@@ -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); memmove(pos, pos + CCMP_HDR_LEN, hdrlen);
/* the HW only needs room for the IV, but not the actual IV */ /* 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; return 0;
hdr = (struct ieee80211_hdr *) pos; hdr = (struct ieee80211_hdr *) pos;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册