From da8e9326195f94b4c807d25fe28ba2df985f4404 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 17 Sep 2013 09:19:39 +0000 Subject: mac80211: drop spoofed packets in ad-hoc mode (fixes #12427) Signed-off-by: Felix Fietkau Backport of r38013 git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@38014 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/mac80211/patches/300-pending_work.patch | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'package/mac80211') diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch index 1871a8d8ef..63333bee5c 100644 --- a/package/mac80211/patches/300-pending_work.patch +++ b/package/mac80211/patches/300-pending_work.patch @@ -239,7 +239,17 @@ break; case cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP): case cpu_to_le16(IEEE80211_STYPE_REASSOC_RESP): -@@ -3059,10 +3067,16 @@ static int prepare_for_handlers(struct i +@@ -3008,6 +3016,9 @@ static int prepare_for_handlers(struct i + case NL80211_IFTYPE_ADHOC: + if (!bssid) + return 0; ++ if (ether_addr_equal(sdata->vif.addr, hdr->addr2) || ++ ether_addr_equal(sdata->u.ibss.bssid, hdr->addr2)) ++ return 0; + if (ieee80211_is_beacon(hdr->frame_control)) { + return 1; + } else if (!ieee80211_bssid_match(bssid, sdata->u.ibss.bssid)) { +@@ -3059,10 +3070,16 @@ static int prepare_for_handlers(struct i } break; case NL80211_IFTYPE_WDS: -- cgit v1.2.3