Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/dev/pci pull up rev 1.26 from trunk (requested by t...



details:   https://anonhg.NetBSD.org/src/rev/78f1f399276d
branches:  netbsd-1-4
changeset: 469467:78f1f399276d
user:      cgd <cgd%NetBSD.org@localhost>
date:      Wed Sep 22 03:25:16 1999 +0000

description:
pull up rev 1.26 from trunk (requested by thorpej):
  Fix packet reception in promiscuous mode: compare the Ethernet
  destination address against our station address if it's not a
  multicast packet.  Fixes a redirect storm problem.

diffstat:

 sys/dev/pci/if_vr.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 8873f43ac20b -r 78f1f399276d sys/dev/pci/if_vr.c
--- a/sys/dev/pci/if_vr.c       Wed Sep 22 03:19:44 1999 +0000
+++ b/sys/dev/pci/if_vr.c       Wed Sep 22 03:25:16 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vr.c,v 1.19.2.2 1999/04/26 23:54:36 perry Exp $     */
+/*     $NetBSD: if_vr.c,v 1.19.2.3 1999/09/22 03:25:16 cgd Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -856,8 +856,9 @@
                if (ifp->if_bpf) {
                        bpf_mtap(ifp->if_bpf, m);
                        if ((ifp->if_flags & IFF_PROMISC) != 0 &&
-                           (rxstat & (VR_RXSTAT_RX_PHYS | VR_RXSTAT_RX_BROAD |
-                                      VR_RXSTAT_RX_MULTI)) == 0) {
+                           ETHER_IS_MULTICAST(eh->ether_dhost) == 0 &&
+                           memcmp(eh->ether_dhost, LLADDR(ifp->if_sadl),
+                                  ETHER_ADDR_LEN) != 0) {
                                m_freem(m);
                                continue;
                        }



Home | Main Index | Thread Index | Old Index