diff options
author | Johannes Berg <johannes.berg@intel.com> | 2021-06-09 17:13:06 +0300 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2021-06-30 15:48:30 +0300 |
commit | 6ab6b68ddf09fad033e653ed85acc8789d57fa6b (patch) | |
tree | 64785829ef6d7f1022e8e09abb6812aafef1688a /net/mac80211 | |
parent | 24e2441b102db48bf8eec1f6b789db49b5e86adb (diff) | |
download | linux-6ab6b68ddf09fad033e653ed85acc8789d57fa6b.tar.xz |
mac80211: drop multicast fragments
[ Upstream commit a9799541ca34652d9996e45f80e8e03144c12949 ]
These are not permitted by the spec, just drop them.
Link: https://lore.kernel.org/r/20210609161305.23def022b750.Ibd6dd3cdce573dae262fcdc47f8ac52b883a9c50@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/rx.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 2ba19decb126..012697efafc3 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2124,17 +2124,15 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx) sc = le16_to_cpu(hdr->seq_ctrl); frag = sc & IEEE80211_SCTL_FRAG; - if (is_multicast_ether_addr(hdr->addr1)) { - I802_DEBUG_INC(rx->local->dot11MulticastReceivedFrameCount); - goto out_no_led; - } - if (rx->sta) cache = &rx->sta->frags; if (likely(!ieee80211_has_morefrags(fc) && frag == 0)) goto out; + if (is_multicast_ether_addr(hdr->addr1)) + return RX_DROP_MONITOR; + I802_DEBUG_INC(rx->local->rx_handlers_fragments); if (skb_linearize(rx->skb)) @@ -2260,7 +2258,6 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx) out: ieee80211_led_rx(rx->local); - out_no_led: if (rx->sta) rx->sta->rx_stats.packets++; return RX_CONTINUE; |