git: 9front

Download patch

ref: 17eee9f2d4605e0b6e874809bd90e8208e214e7e
parent: 11f8b192bf416d2b1e23450399e910b0f8c82ef8
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Mar 6 17:09:17 EST 2014

wifi: remove misleading packet header length check in wifidecrypt()

we do not need to check block length in wifidecrypt()
again as wifiiq() already filters out truncated frames.

--- a/sys/src/9/pc/wifi.c
+++ b/sys/src/9/pc/wifi.c
@@ -997,9 +997,6 @@
 	Wkey *k;
 
 	w = (Wifipkt*)b->rp;
-	if(BLEN(b) < WIFIHDRSIZE)
-		goto drop;
-
 	n = wifihdrlen(w);
 	b->rp += n;
 	if(BLEN(b) < 8+8)
--