Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src pullup changes 1.17->1.19.
details: https://anonhg.NetBSD.org/src/rev/69cfb3814db2
branches: netbsd-1-4
changeset: 469404:69cfb3814db2
user: itojun <itojun%NetBSD.org@localhost>
date: Thu Sep 16 03:36:58 1999 +0000
description:
pullup changes 1.17->1.19.
Avoid multicast packet loopback from itself during promiscuous mode.
This makes the driver behave as IFF_SIMPLEX interface in all cases.
diffstat:
CHANGES-1.4.2 | 7 ++++++-
sys/dev/ic/smc91cxx.c | 42 ++++++++++++++++++++++++++++++------------
2 files changed, 36 insertions(+), 13 deletions(-)
diffs (80 lines):
diff -r 9e75b359eece -r 69cfb3814db2 CHANGES-1.4.2
--- a/CHANGES-1.4.2 Mon Sep 13 23:08:44 1999 +0000
+++ b/CHANGES-1.4.2 Thu Sep 16 03:36:58 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-1.4.2,v 1.1.2.23 1999/09/13 23:08:44 he Exp $
+# $NetBSD: CHANGES-1.4.2,v 1.1.2.24 1999/09/16 03:36:58 itojun Exp $
A complete list of changes from NetBSD 1.4.1 to NetBSD 1.4.2:
@@ -353,3 +353,8 @@
sys/arch/arm32/podulebus/if_ie.c (patch)
Fix Berkeley Packet Filter support, fixing PR#8343. (tron)
+
+sys/dev/ic/smc91cxx.c 1.18-1.19
+
+ Avoid multicast packet loopback from itself during promiscuous mode.
+ This makes the driver behave as IFF_SIMPLEX interface in all cases.
diff -r 9e75b359eece -r 69cfb3814db2 sys/dev/ic/smc91cxx.c
--- a/sys/dev/ic/smc91cxx.c Mon Sep 13 23:08:44 1999 +0000
+++ b/sys/dev/ic/smc91cxx.c Thu Sep 16 03:36:58 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smc91cxx.c,v 1.16 1999/03/25 23:20:22 thorpej Exp $ */
+/* $NetBSD: smc91cxx.c,v 1.16.2.1 1999/09/16 03:36:59 itojun Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -923,23 +923,41 @@
ifp->if_ipackets++;
-#if NBPFILTER > 0
- /*
- * Hand the packet off to bpf listeners. If there's a bpf listener,
- * we need to check if the packet is ours.
- */
- if (ifp->if_bpf) {
- bpf_mtap(ifp->if_bpf, m);
-
- if ((ifp->if_flags & IFF_PROMISC) &&
- (eh->ether_dhost[0] & 1) == 0 && /* !mcast and !bcast */
- ether_cmp(eh->ether_dhost, LLADDR(ifp->if_sadl))) {
+ if ((ifp->if_flags & IFF_PROMISC) != 0) {
+ /*
+ * Make sure to behave as IFF_SIMPLEX in all cases.
+ * Drop multicast/broadcast packet looped back from myself.
+ *
+ * This is to cope with SMC91C92 (Megahertz XJ10BT), which
+ * loops back multicast packet to itself on promiscuous mode.
+ * (should be ensured by chipset configuration)
+ */
+ 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 NBPFILTER > 0
+ /*
+ * Hand the packet off to bpf listeners.
+ */
+ if (ifp->if_bpf)
+ bpf_mtap(ifp->if_bpf, m);
#endif
+ if ((ifp->if_flags & IFF_PROMISC) != 0) {
+ /*
+ * 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;
+ }
+ }
+
/*
* Strip the ethernet header.
*/
Home |
Main Index |
Thread Index |
Old Index