summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-01-12 08:01:15 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2018-01-12 08:01:15 +0100
commit2088f8c991de090e8b9e75ecbd416c98a511b214 (patch)
tree9845d5772ea4334c362d1ce9b5740adfd0c9382d /sys/src
parentd682a6cb38b68c6c1a4671bb59b4e1136857b217 (diff)
wifi: filter out loopback traffic from myself
broadcast traffic was received back on the wire causing duplicate address detection to break with dmat proy as the rewritten broadcasts where observable. the fix is to just ignore packets from ourselfs received from the air. devether already handles loopback.
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/9/pc/wifi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/9/pc/wifi.c b/sys/src/9/pc/wifi.c
index 02adc6b69..27f70d7b5 100644
--- a/sys/src/9/pc/wifi.c
+++ b/sys/src/9/pc/wifi.c
@@ -100,6 +100,8 @@ wifiiq(Wifi *wifi, Block *b)
hdrlen = wifihdrlen(w);
if(BLEN(b) < hdrlen)
goto drop;
+ if(memcmp(srcaddr(w), wifi->ether->ea, Eaddrlen) == 0)
+ goto drop;
if(w->fc[1] & 0x40){
/* encrypted */
qpass(wifi->iq, b);