Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Don't rely on the receive descriptor's BCAST/MCAS...



details:   https://anonhg.NetBSD.org/src/rev/e63f52da877c
branches:  trunk
changeset: 481853:e63f52da877c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Feb 08 00:22:13 2000 +0000

description:
Don't rely on the receive descriptor's BCAST/MCAST status bits.  Test the
Ethernet destination address to see if it's multicast.

diffstat:

 sys/dev/ic/smc83c170.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (24 lines):

diff -r 5c7696b1f5a8 -r e63f52da877c sys/dev/ic/smc83c170.c
--- a/sys/dev/ic/smc83c170.c    Mon Feb 07 22:07:27 2000 +0000
+++ b/sys/dev/ic/smc83c170.c    Tue Feb 08 00:22:13 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smc83c170.c,v 1.25 2000/02/02 17:09:47 thorpej Exp $   */
+/*     $NetBSD: smc83c170.c,v 1.26 2000/02/08 00:22:13 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -748,10 +748,10 @@
                        if (ifp->if_bpf) {
                                bpf_mtap(ifp->if_bpf, m);
                                if ((ifp->if_flags & IFF_PROMISC) != 0 &&
-                                   bcmp(LLADDR(ifp->if_sadl), eh->ether_dhost,
-                                        ETHER_ADDR_LEN) != 0 &&
-                                   (rxd->er_rxstatus &
-                                    (ER_RXSTAT_BCAST|ER_RXSTAT_MCAST)) == 0) {
+                                   memcmp(LLADDR(ifp->if_sadl),
+                                          eh->ether_dhost,
+                                          ETHER_ADDR_LEN) != 0 &&
+                                   ETHER_IS_MULTICAST(eh->ether_dhost) == 0) {
                                        m_freem(m);
                                        continue;
                                }



Home | Main Index | Thread Index | Old Index