diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-02-13 08:23:54 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-02-13 08:23:54 +0100 |
commit | 0243f52bae9eba9d80510916573764c859616ef6 (patch) | |
tree | e71e85cdf02878074db08d1f3194ce11685c5f18 /sys/src/9/pc/wifi.c | |
parent | 194094683a641d99335aa941188a7698ff3dd550 (diff) |
etheriwl: dont let transmit change back receiver settings when in promisc mode, cleanup
Diffstat (limited to 'sys/src/9/pc/wifi.c')
-rw-r--r-- | sys/src/9/pc/wifi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/9/pc/wifi.c b/sys/src/9/pc/wifi.c index 0aef25d68..e03d6a368 100644 --- a/sys/src/9/pc/wifi.c +++ b/sys/src/9/pc/wifi.c @@ -345,7 +345,8 @@ wifietheroq(Wifi *wifi, Block *b) Wnode *bss; SNAP *s; - if(BLEN(b) < ETHERHDRSIZE){ + bss = wifi->bss; + if(bss == nil || BLEN(b) < ETHERHDRSIZE){ freeb(b); return; } @@ -357,8 +358,7 @@ wifietheroq(Wifi *wifi, Block *b) w = (Wifipkt*)b->rp; w->fc[0] = 0x08; /* data */ w->fc[1] = 0x01; /* STA->AP */ - bss = wifi->bss; - memmove(w->a1, bss != nil ? bss->bssid : wifi->ether->bcast, Eaddrlen); + memmove(w->a1, bss->bssid, Eaddrlen); memmove(w->a2, e.s, Eaddrlen); memmove(w->a3, e.d, Eaddrlen); |