ref: 7b5cf8de2dccafa565a62908d307f2033ee69420
parent: ad36593a991e526168f5bcc2d3d14e0c66c0f642
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Jan 13 06:41:37 EST 2018
ether79c970: dont disable promisc mode when multicast table is not empty
--- a/sys/src/9/pc/ether79c970.c
+++ b/sys/src/9/pc/ether79c970.c
@@ -299,7 +299,7 @@
ctlr->iow(ctlr, Rap, 15);
x = ctlr->ior(ctlr, Rdp) & ~Prom;
- if(on)
+ if(on || ether->nmaddr > 0)
x |= Prom;
ctlr->iow(ctlr, Rdp, x);
ctlr->iow(ctlr, Rap, 0);
@@ -315,7 +315,8 @@
static void
multicast(void* arg, uchar*, int)
{
- promiscuous(arg, 1);
+ Ether *ether = arg;
+ promiscuous(arg, ether->prom);
}
static void