diff options
| -rw-r--r-- | sys/src/9/pc/wifi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/src/9/pc/wifi.c b/sys/src/9/pc/wifi.c index cc880ac49..0aef25d68 100644 --- a/sys/src/9/pc/wifi.c +++ b/sys/src/9/pc/wifi.c @@ -63,9 +63,13 @@ wifiiq(Wifi *wifi, Block *b) default: goto drop; } - if(BLEN(b) < SNAPHDRSIZE || b->rp[0] != 0xAA || b->rp[1] != 0xAA || b->rp[2] != 0x03) + if(BLEN(b) < SNAPHDRSIZE) break; memmove(&s, b->rp, SNAPHDRSIZE); + if(s.dsap != 0xAA || s.ssap != 0xAA || s.control != 3) + break; + if(s.orgcode[0] != 0 || s.orgcode[1] != 0 || s.orgcode[2] != 0) + break; b->rp += SNAPHDRSIZE-ETHERHDRSIZE; e = (Etherpkt*)b->rp; switch(w.fc[1] & 0x03){ |
