diff options
author | Max Stepanov <Max.Stepanov@intel.com> | 2014-06-10 19:00:08 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-06-23 10:45:14 +0200 |
commit | 744462a91ecf5d1ec64857488bf99000ef626921 (patch) | |
tree | 30e065072ae53bc107c359503a2b659acab65c96 /net/mac80211 | |
parent | Linux 3.16-rc1 (diff) | |
download | linux-744462a91ecf5d1ec64857488bf99000ef626921.tar.xz linux-744462a91ecf5d1ec64857488bf99000ef626921.zip |
mac80211: WEP extra head/tail room in ieee80211_send_auth
After skb allocation and call to ieee80211_wep_encrypt in ieee80211_send_auth
the flow fails with a warning in ieee80211_wep_add_iv on verification of
available head/tailroom needed for WEP_IV and WEP_ICV.
Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 6886601afe1c..a6cda52ed920 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1096,11 +1096,12 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, int err; /* 24 + 6 = header + auth_algo + auth_transaction + status_code */ - skb = dev_alloc_skb(local->hw.extra_tx_headroom + 24 + 6 + extra_len); + skb = dev_alloc_skb(local->hw.extra_tx_headroom + IEEE80211_WEP_IV_LEN + + 24 + 6 + extra_len + IEEE80211_WEP_ICV_LEN); if (!skb) return; - skb_reserve(skb, local->hw.extra_tx_headroom); + skb_reserve(skb, local->hw.extra_tx_headroom + IEEE80211_WEP_IV_LEN); mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24 + 6); memset(mgmt, 0, 24 + 6); |