Changeset 38014


Ignore:
Timestamp:
2013-09-17T11:19:39+02:00 (4 years ago)
Author:
nbd
Message:

mac80211: drop spoofed packets in ad-hoc mode (fixes #12427)

Signed-off-by: Felix Fietkau <nbd@…>

Backport of r38013

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/attitude_adjustment/package/mac80211/patches/300-pending_work.patch

    r37923 r38014  
    240240        case cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP): 
    241241        case cpu_to_le16(IEEE80211_STYPE_REASSOC_RESP): 
    242 @@ -3059,10 +3067,16 @@ static int prepare_for_handlers(struct i 
     242@@ -3008,6 +3016,9 @@ static int prepare_for_handlers(struct i 
     243        case NL80211_IFTYPE_ADHOC: 
     244                if (!bssid) 
     245                        return 0; 
     246+               if (ether_addr_equal(sdata->vif.addr, hdr->addr2) || 
     247+                   ether_addr_equal(sdata->u.ibss.bssid, hdr->addr2)) 
     248+                       return 0; 
     249                if (ieee80211_is_beacon(hdr->frame_control)) { 
     250                        return 1; 
     251                } else if (!ieee80211_bssid_match(bssid, sdata->u.ibss.bssid)) { 
     252@@ -3059,10 +3070,16 @@ static int prepare_for_handlers(struct i 
    243253                } 
    244254                break; 
Note: See TracChangeset for help on using the changeset viewer.