diff options
author | yongari <yongari@FreeBSD.org> | 2007-12-20 07:26:20 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2007-12-20 07:26:20 +0000 |
commit | 4717ca2cc6d8a57d3c77396a8ad760817e88d7b4 (patch) | |
tree | 33679559af9b574d30da7d9649f07d2f9a85aecf | |
parent | cbdadd6e3ebff675d8f57bbb74520c6e167bd669 (diff) | |
download | FreeBSD-src-4717ca2cc6d8a57d3c77396a8ad760817e88d7b4.zip FreeBSD-src-4717ca2cc6d8a57d3c77396a8ad760817e88d7b4.tar.gz |
By definition promiscuous mode should see all unicast frames as well
as multicast/broadcast frames. Previously re(4) ignored multicast
frames in promiscuous mode. The RTL8169 datasheet was not clear
how it handles multicast frames in promiscuous mode.
PR: kern/118572
MFC after: 3 days
-rw-r--r-- | sys/dev/re/if_re.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 2734069..c8e7f84 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -643,8 +643,12 @@ re_setmulti(sc) if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { if (ifp->if_flags & IFF_PROMISC) rxfilt |= RL_RXCFG_RX_ALLPHYS; - if (ifp->if_flags & IFF_ALLMULTI) - rxfilt |= RL_RXCFG_RX_MULTI; + /* + * Unlike other hardwares, we have to explicitly set + * RL_RXCFG_RX_MULTI to receive multicast frames in + * promiscuous mode. + */ + rxfilt |= RL_RXCFG_RX_MULTI; CSR_WRITE_4(sc, RL_RXCFG, rxfilt); CSR_WRITE_4(sc, RL_MAR0, 0xFFFFFFFF); CSR_WRITE_4(sc, RL_MAR4, 0xFFFFFFFF); |