Commit cc117298 authored by Bertold Van den Bergh's avatar Bertold Van den Bergh Committed by Johannes Berg

mac80211: Only accept data frames in OCB mode

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: default avatarBertold Van den Bergh <bertold.vandenbergh@esat.kuleuven.be>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 5765f9f6
...@@ -3316,7 +3316,7 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx) ...@@ -3316,7 +3316,7 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
case NL80211_IFTYPE_OCB: case NL80211_IFTYPE_OCB:
if (!bssid) if (!bssid)
return false; return false;
if (ieee80211_is_beacon(hdr->frame_control)) if (!ieee80211_is_data_present(hdr->frame_control))
return false; return false;
if (!is_broadcast_ether_addr(bssid)) if (!is_broadcast_ether_addr(bssid))
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment