diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2006-10-03 19:49:32 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-02 00:11:57 -0500 |
commit | 837925df022a667c302b24aad9d6a58f94efd959 (patch) | |
tree | f1f4aebf44d3f44635fac65efcdd4a56749d376f /net/ieee80211/ieee80211_rx.c | |
parent | 42a4cf9576f036db69e15fa6b4e72986e17f0359 (diff) |
[PATCH] ieee80211: Drop and count duplicate data frames to remove 'replay detected' log messages
In the SoftMAC version of the IEEE 802.11 stack, not all duplicate messages are
detected. For the most part, there is no difficulty; however for TKIP and CCMP
encryption, the duplicates result in a "replay detected" log message where the
received and previous values of the TSC are identical. This change adds a new
variable to the ieee80211_device structure that holds the 'seq_ctl' value for
the previous frame. When a new frame repeats the value, the frame is dropped and
the appropriate counter is incremented.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/ieee80211/ieee80211_rx.c')
-rw-r--r-- | net/ieee80211/ieee80211_rx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c index d9265195656d..ce28d571afac 100644 --- a/net/ieee80211/ieee80211_rx.c +++ b/net/ieee80211/ieee80211_rx.c | |||
@@ -478,6 +478,11 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
478 | goto rx_exit; | 478 | goto rx_exit; |
479 | } | 479 | } |
480 | #endif | 480 | #endif |
481 | /* drop duplicate 802.11 retransmissions (IEEE 802.11 Chap. 9.29) */ | ||
482 | if (sc == ieee->prev_seq_ctl) | ||
483 | goto rx_dropped; | ||
484 | else | ||
485 | ieee->prev_seq_ctl = sc; | ||
481 | 486 | ||
482 | /* Data frame - extract src/dst addresses */ | 487 | /* Data frame - extract src/dst addresses */ |
483 | if (skb->len < IEEE80211_3ADDR_LEN) | 488 | if (skb->len < IEEE80211_3ADDR_LEN) |