1
0
Fork 0

mac80211: fix oops on mesh PS broadcast forwarding

Introduced with de74a1d903
"mac80211: fix WPA with VLAN on AP side with ps-sta".
Apparently overwrites the sdata pointer with non-valid data in
the case of mesh.
Fix this by checking for IFTYPE_AP_VLAN.

Signed-off-by: Marco Porsch <marco@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
hifive-unleashed-5.1
Marco Porsch 2013-03-01 16:01:18 +01:00 committed by Johannes Berg
parent 645e77def9
commit 7cbf9d017d
1 changed files with 2 additions and 1 deletions

View File

@ -2755,7 +2755,8 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
cpu_to_le16(IEEE80211_FCTL_MOREDATA);
}
sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev);
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev);
if (!ieee80211_tx_prepare(sdata, &tx, skb))
break;
dev_kfree_skb_any(skb);