Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Don't use old NBPFILTER macro and use new bpf_mt...
details: https://anonhg.NetBSD.org/src/rev/12b6ff09c2d0
branches: trunk
changeset: 782334:12b6ff09c2d0
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Oct 29 01:36:33 2012 +0000
description:
Don't use old NBPFILTER macro and use new bpf_mtap() API.
It fixes a bug that et(4) can't use bpf.
diffstat:
sys/dev/pci/if_et.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diffs (52 lines):
diff -r f5b56c8cffd6 -r 12b6ff09c2d0 sys/dev/pci/if_et.c
--- a/sys/dev/pci/if_et.c Sun Oct 28 21:12:44 2012 +0000
+++ b/sys/dev/pci/if_et.c Mon Oct 29 01:36:33 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_et.c,v 1.4 2012/07/22 14:33:02 matt Exp $ */
+/* $NetBSD: if_et.c,v 1.5 2012/10/29 01:36:33 msaitoh Exp $ */
/* $OpenBSD: if_et.c,v 1.11 2008/06/08 06:18:07 jsg Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.4 2012/07/22 14:33:02 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.5 2012/10/29 01:36:33 msaitoh Exp $");
#include "opt_inet.h"
#include "vlan.h"
@@ -70,9 +70,7 @@
#include <netinet/if_inarp.h>
#endif
-#if NBPFILTER > 0
#include <net/bpf.h>
-#endif
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
@@ -1121,10 +1119,7 @@
trans = 1;
-#if NBPFILTER > 0
- if (ifp->if_bpf != NULL)
- bpf_mtap(ifp->if_bpf, m);
-#endif
+ bpf_mtap(ifp, m);
}
if (trans) {
@@ -1779,10 +1774,7 @@
ETHER_CRC_LEN;
m->m_pkthdr.rcvif = ifp;
-#if NBPFILTER > 0
- if (ifp->if_bpf != NULL)
- bpf_mtap(ifp->if_bpf, m);
-#endif
+ bpf_mtap(ifp, m);
ifp->if_ipackets++;
(*ifp->if_input)(ifp, m);
Home |
Main Index |
Thread Index |
Old Index