Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/arch/arm32/podulebus Apply patch:



details:   https://anonhg.NetBSD.org/src/rev/876ebe681fd4
branches:  netbsd-1-4
changeset: 469402:876ebe681fd4
user:      he <he%NetBSD.org@localhost>
date:      Mon Sep 13 23:08:29 1999 +0000

description:
Apply patch:
  Fix Berkeley Packet Filter support, fixing PR#8343.  (tron)

diffstat:

 sys/arch/arm32/podulebus/if_ie.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 36874b5da25e -r 876ebe681fd4 sys/arch/arm32/podulebus/if_ie.c
--- a/sys/arch/arm32/podulebus/if_ie.c  Mon Sep 13 23:03:05 1999 +0000
+++ b/sys/arch/arm32/podulebus/if_ie.c  Mon Sep 13 23:08:29 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie.c,v 1.22 1999/03/25 23:11:52 thorpej Exp $ */
+/* $NetBSD: if_ie.c,v 1.22.2.1 1999/09/13 23:08:29 he Exp $ */
 
 /*
  * Copyright (c) 1995 Melvin Tang-Richardson.
@@ -1314,9 +1314,18 @@
                ether_sprintf(eh.ether_shost), (u_int)eh.ether_type );
 */
 
-#if NBFILTER > 0
+#if NBPFILTER > 0
     if ( ifp->if_bpf ) {
-       bpf_mtap(ifp->if_bpf, m );
+        /* We need to pass the ethernet header; cons up an mbuf to hold it.
+          This is safe since the bpf will only read the packet, it will
+          never try to free it.  */
+       struct mbuf m0;
+
+       m0.m_next = m;
+       m0.m_len = sizeof (struct ether_header);
+       m0.m_data = (char *)&eh;
+
+       bpf_mtap(ifp->if_bpf, &m0 );
     };
 #endif
 



Home | Main Index | Thread Index | Old Index