diff options
author | Andreas Müller <goo@stapelspeicher.org> | 2014-12-12 06:11:11 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-12-12 06:11:14 -0500 |
commit | d025933e29872cb1fe19fc54d80e4dfa4ee5779c (patch) | |
tree | ebdb6d21d4ba4bed3bb5aa30e6f19648ad671df3 /net | |
parent | 7e6225a1604d0c6aa4140289bf5761868ffc9c83 (diff) |
mac80211: fix multicast LED blinking and counter
As multicast-frames can't be fragmented, "dot11MulticastReceivedFrameCount"
stopped being incremented after the use-after-free fix. Furthermore, the
RX-LED will be triggered by every multicast frame (which wouldn't happen
before) which wouldn't allow the LED to rest at all.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=89431 which also had the
patch.
Cc: stable@vger.kernel.org
Fixes: b8fff407a180 ("mac80211: fix use-after-free in defragmentation")
Signed-off-by: Andreas Müller <goo@stapelspeicher.org>
[rewrite commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/rx.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 49c23bdf08bb..683b10f46505 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1761,14 +1761,14 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx) | |||
1761 | sc = le16_to_cpu(hdr->seq_ctrl); | 1761 | sc = le16_to_cpu(hdr->seq_ctrl); |
1762 | frag = sc & IEEE80211_SCTL_FRAG; | 1762 | frag = sc & IEEE80211_SCTL_FRAG; |
1763 | 1763 | ||
1764 | if (likely(!ieee80211_has_morefrags(fc) && frag == 0)) | ||
1765 | goto out; | ||
1766 | |||
1767 | if (is_multicast_ether_addr(hdr->addr1)) { | 1764 | if (is_multicast_ether_addr(hdr->addr1)) { |
1768 | rx->local->dot11MulticastReceivedFrameCount++; | 1765 | rx->local->dot11MulticastReceivedFrameCount++; |
1769 | goto out; | 1766 | goto out_no_led; |
1770 | } | 1767 | } |
1771 | 1768 | ||
1769 | if (likely(!ieee80211_has_morefrags(fc) && frag == 0)) | ||
1770 | goto out; | ||
1771 | |||
1772 | I802_DEBUG_INC(rx->local->rx_handlers_fragments); | 1772 | I802_DEBUG_INC(rx->local->rx_handlers_fragments); |
1773 | 1773 | ||
1774 | if (skb_linearize(rx->skb)) | 1774 | if (skb_linearize(rx->skb)) |
@@ -1859,9 +1859,10 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx) | |||
1859 | status->rx_flags |= IEEE80211_RX_FRAGMENTED; | 1859 | status->rx_flags |= IEEE80211_RX_FRAGMENTED; |
1860 | 1860 | ||
1861 | out: | 1861 | out: |
1862 | ieee80211_led_rx(rx->local); | ||
1863 | out_no_led: | ||
1862 | if (rx->sta) | 1864 | if (rx->sta) |
1863 | rx->sta->rx_packets++; | 1865 | rx->sta->rx_packets++; |
1864 | ieee80211_led_rx(rx->local); | ||
1865 | return RX_CONTINUE; | 1866 | return RX_CONTINUE; |
1866 | } | 1867 | } |
1867 | 1868 | ||