mac80211: drop spoofed packets in ad-hoc mode (fixes #12427)
authorFelix Fietkau <nbd@openwrt.org>
Tue, 17 Sep 2013 09:17:40 +0000 (09:17 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 17 Sep 2013 09:17:40 +0000 (09:17 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 38013

package/kernel/mac80211/patches/300-pending_work.patch

index 3c3eb63bb34bccc36004a51c0d55b3a035c7174f..5beb4405d378b25cb8a324c13e74f83948ad65b7 100644 (file)
                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: