diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-09-17 09:17:40 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-09-17 09:17:40 +0000 |
commit | 06c07d0cf54c3af50e050d5454b56cca2344a5ed (patch) | |
tree | 12869f3cb65c69c42342609b537a7be69aeba51e /package/kernel | |
parent | 81cf14367f8ae02d06d6b906a096c2f9a8bdd961 (diff) | |
download | upstream-06c07d0cf54c3af50e050d5454b56cca2344a5ed.tar.gz upstream-06c07d0cf54c3af50e050d5454b56cca2344a5ed.tar.bz2 upstream-06c07d0cf54c3af50e050d5454b56cca2344a5ed.zip |
mac80211: drop spoofed packets in ad-hoc mode (fixes #12427)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38013 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel')
-rw-r--r-- | package/kernel/mac80211/patches/300-pending_work.patch | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/package/kernel/mac80211/patches/300-pending_work.patch b/package/kernel/mac80211/patches/300-pending_work.patch index 3c3eb63bb3..5beb4405d3 100644 --- a/package/kernel/mac80211/patches/300-pending_work.patch +++ b/package/kernel/mac80211/patches/300-pending_work.patch @@ -339,7 +339,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: |