Skip to content

Commit

Permalink
mac80211: fix oops on mesh PS broadcast forwarding
Browse files Browse the repository at this point in the history
Introduced with de74a1d
"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>
  • Loading branch information
Marco Porsch authored and Johannes Berg committed Mar 1, 2013
1 parent 645e77d commit 7cbf9d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7cbf9d0

Please sign in to comment.