Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic fix promisc mode for smc91cxx again.



details:   https://anonhg.NetBSD.org/src/rev/125eb1cbbb1f
branches:  trunk
changeset: 481672:125eb1cbbb1f
user:      itojun <itojun%NetBSD.org@localhost>
date:      Thu Feb 03 16:20:49 2000 +0000

description:
fix promisc mode for smc91cxx again.

diffstat:

 sys/dev/ic/smc91cxx.c |  25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

diffs (47 lines):

diff -r 72a543589b3d -r 125eb1cbbb1f sys/dev/ic/smc91cxx.c
--- a/sys/dev/ic/smc91cxx.c     Thu Feb 03 16:17:50 2000 +0000
+++ b/sys/dev/ic/smc91cxx.c     Thu Feb 03 16:20:49 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smc91cxx.c,v 1.22 2000/02/02 16:04:42 itojun Exp $     */
+/*     $NetBSD: smc91cxx.c,v 1.23 2000/02/03 16:20:49 itojun Exp $     */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -937,19 +937,9 @@
         */
        if ((ifp->if_flags & IFF_PROMISC) != 0) {
                /*
-                * Drop multicast/broadcast packet looped back from myself.
+                * Drop packet looped back from myself.
                 */
-               if ((eh->ether_dhost[0] & 1) == 1 &&    /* mcast || bcast */
-                   ether_cmp(eh->ether_shost, LLADDR(ifp->if_sadl)) == 0) {
-                       m_freem(m);
-                       goto out;
-               }
-
-               /*
-                * If this is unicast and not for me, drop it.
-                */
-               if ((eh->ether_dhost[0] & 1) == 0 &&    /* !mcast and !bcast */
-                   ether_cmp(eh->ether_dhost, LLADDR(ifp->if_sadl)) != 0) {
+               if (ether_cmp(eh->ether_shost, LLADDR(ifp->if_sadl)) == 0) {
                        m_freem(m);
                        goto out;
                }
@@ -963,6 +953,15 @@
                bpf_mtap(ifp->if_bpf, m);
 #endif
 
+       /*
+        * If this is unicast and not for me, drop it.
+        */
+       if ((eh->ether_dhost[0] & 1) == 0 &&    /* !mcast and !bcast */
+           ether_cmp(eh->ether_dhost, LLADDR(ifp->if_sadl)) != 0) {
+               m_freem(m);
+               goto out;
+       }
+
        m->m_pkthdr.len = m->m_len = packetlen;
        (*ifp->if_input)(ifp, m);
 



Home | Main Index | Thread Index | Old Index