Skip to content

Commit 744462a

Browse files
mstepanojmberg-intel
authored andcommitted
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>
1 parent 7171511 commit 744462a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

net/mac80211/util.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,11 +1096,12 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
10961096
int err;
10971097

10981098
/* 24 + 6 = header + auth_algo + auth_transaction + status_code */
1099-
skb = dev_alloc_skb(local->hw.extra_tx_headroom + 24 + 6 + extra_len);
1099+
skb = dev_alloc_skb(local->hw.extra_tx_headroom + IEEE80211_WEP_IV_LEN +
1100+
24 + 6 + extra_len + IEEE80211_WEP_ICV_LEN);
11001101
if (!skb)
11011102
return;
11021103

1103-
skb_reserve(skb, local->hw.extra_tx_headroom);
1104+
skb_reserve(skb, local->hw.extra_tx_headroom + IEEE80211_WEP_IV_LEN);
11041105

11051106
mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24 + 6);
11061107
memset(mgmt, 0, 24 + 6);

0 commit comments

Comments
 (0)