diff mbox

mac80211: fix oops on mesh PS broadcast forwarding

Message ID 1362150078-10802-1-git-send-email-marco@cozybit.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Marco Porsch March 1, 2013, 3:01 p.m. UTC
Introduced with de74a1d9032f4d37ea453ad2a647e1aff4cd2591
"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>
---
 net/mac80211/tx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Johannes Berg March 1, 2013, 3:09 p.m. UTC | #1
On Fri, 2013-03-01 at 16:01 +0100, Marco Porsch wrote:
> Introduced with de74a1d9032f4d37ea453ad2a647e1aff4cd2591
> "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.

Applied.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index c79860f..cb4b9ab 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2749,7 +2749,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);