diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-03-09 18:12:49 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-03-09 18:12:49 +0100 |
commit | b6581f21e59e0a9575a46166dd7d95136fb4340e (patch) | |
tree | 88dfe09b51736dde4fc045a6469afeaf036cc3b0 /sys/src/cmd/aux/wpa.c | |
parent | 6f374a524359173c87c046940853bf5d38444696 (diff) |
aux/wpa: check reply counter only after mic check
Diffstat (limited to 'sys/src/cmd/aux/wpa.c')
-rw-r--r-- | sys/src/cmd/aux/wpa.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sys/src/cmd/aux/wpa.c b/sys/src/cmd/aux/wpa.c index c918ad54f..2f0442156 100644 --- a/sys/src/cmd/aux/wpa.c +++ b/sys/src/cmd/aux/wpa.c @@ -368,18 +368,6 @@ main(int argc, char *argv[]) (uvlong)kd->rsc[4]<<32 | (uvlong)kd->rsc[5]<<40; - repc = (uvlong)kd->repc[7] | - (uvlong)kd->repc[6]<<8 | - (uvlong)kd->repc[5]<<16 | - (uvlong)kd->repc[4]<<24 | - (uvlong)kd->repc[3]<<32 | - (uvlong)kd->repc[2]<<40 | - (uvlong)kd->repc[1]<<48 | - (uvlong)kd->repc[0]<<56; - - if(repc <= lastrepc) - continue; - if((flags & Fmic) == 0){ if((flags & (Fptk|Fack)) != (Fptk|Fack)) continue; @@ -404,6 +392,16 @@ main(int argc, char *argv[]) if(memcmp(tmp, mic, sizeof(mic)) != 0) continue; + repc = (uvlong)kd->repc[7] | + (uvlong)kd->repc[6]<<8 | + (uvlong)kd->repc[5]<<16 | + (uvlong)kd->repc[4]<<24 | + (uvlong)kd->repc[3]<<32 | + (uvlong)kd->repc[2]<<40 | + (uvlong)kd->repc[1]<<48 | + (uvlong)kd->repc[0]<<56; + if(repc <= lastrepc) + continue; lastrepc = repc; if((flags & (Fptk|Fsec|Fack)) == (Fptk|Fack)){ |