Fix for a false replay detection when seq was initialized to zero and first packet is also seq zero.

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2794 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
mtaylor 2007-10-28 20:40:04 +00:00
parent a45eb4bdc7
commit 01a0d01102
2 changed files with 2 additions and 2 deletions

View File

@ -267,7 +267,7 @@ ccmp_decap(struct ieee80211_key *k, struct sk_buff *skb, int hdrlen)
tid = ((struct ieee80211_qosframe *)wh)->i_qos[0] & IEEE80211_QOS_TID;
/* NB: assume IEEE80211_WEP_MINLEN covers the extended IV */
pn = READ_6(ivp[0], ivp[1], ivp[4], ivp[5], ivp[6], ivp[7]);
if (pn <= k->wk_keyrsc[tid]) {
if (pn && pn <= k->wk_keyrsc[tid]) {
/*
* Replay violation.
*/

View File

@ -297,7 +297,7 @@ tkip_decap(struct ieee80211_key *k, struct sk_buff *skb, int hdrlen)
tid = ((struct ieee80211_qosframe *)wh)->i_qos[0] & IEEE80211_QOS_TID;
ctx->rx_rsc = READ_6(ivp[2], ivp[0], ivp[4], ivp[5], ivp[6], ivp[7]);
if (ctx->rx_rsc <= k->wk_keyrsc[tid]) {
if (ctx->rx_rsc && ctx->rx_rsc <= k->wk_keyrsc[tid]) {
/*
* Replay violation; notify upper layer.
*/