diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-12-18 20:50:25 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-12-18 20:50:25 +0100 |
commit | 3e22f7ef1d56efcc81e7ce0e74bc1992ef0976a8 (patch) | |
tree | a1b615549bd4c4493f9c5a8699d73a727970e0bf /sys/src/cmd/nusb | |
parent | c1eb4b8d6838109655744ce77e20472f8ea6a8ff (diff) |
nusb/ether: dont forward loopback packets on bridges, remove read nonblocking hack
Diffstat (limited to 'sys/src/cmd/nusb')
-rw-r--r-- | sys/src/cmd/nusb/ether/ether.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/sys/src/cmd/nusb/ether/ether.c b/sys/src/cmd/nusb/ether/ether.c index 52481899e..90b919dfc 100644 --- a/sys/src/cmd/nusb/ether/ether.c +++ b/sys/src/cmd/nusb/ether/ether.c @@ -58,8 +58,6 @@ struct Dq Block **qt; int size; - - int nb; }; struct Conn @@ -262,12 +260,6 @@ readconndata(Req *r) d = r->fid->aux; qlock(d); - if(d->q==nil && d->nb){ - qunlock(d); - r->ofcall.count = 0; - respond(r, nil); - return; - } r->aux = nil; *d->rt = r; d->rt = (Req**)&r->aux; @@ -278,18 +270,12 @@ readconndata(Req *r) static void writeconndata(Req *r) { - Dq *d; void *p; int n; Block *b; - d = r->fid->aux; p = r->ifcall.data; n = r->ifcall.count; - if((n == 11) && memcmp(p, "nonblocking", n)==0){ - d->nb = 1; - goto out; - } /* minimum frame length for rtl8150 */ if(n < 60) @@ -315,7 +301,6 @@ writeconndata(Req *r) etheriq(b, 0); -out: r->ofcall.count = r->ifcall.count; respond(r, nil); } @@ -725,7 +710,7 @@ etheriq(Block *b, int wire) qlock(c); if(!c->used) goto next; - if(c->bridge && !wire && !fromme) + if(c->bridge && (tome || !wire && !fromme)) goto next; if(c->type > 0 && c->type != t) goto next; |