mac80211: Only accept data frames in OCB mode
authorBertold Van den Bergh <bertold.vandenbergh@esat.kuleuven.be>
Wed, 5 Aug 2015 14:02:42 +0000 (16:02 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 14 Aug 2015 15:49:49 +0000 (17:49 +0200)
Currently OCB mode accepts frames with bssid==broadcast and type!=beacon.
Some non-data frames are sent matching this, for example probe responses.
This results in unnecessary creation of STA entries.

Signed-off-by: Bertold Van den Bergh <bertold.vandenbergh@esat.kuleuven.be>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rx.c

index f673304f70f5b6f40bf9eefac2c749dd18049f67..4d217d3265f481df712640b5401c27c7186dd7f6 100644 (file)
@@ -3316,7 +3316,7 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
        case NL80211_IFTYPE_OCB:
                if (!bssid)
                        return false;
-               if (ieee80211_is_beacon(hdr->frame_control))
+               if (!ieee80211_is_data_present(hdr->frame_control))
                        return false;
                if (!is_broadcast_ether_addr(bssid))
                        return false;