Module Name: src
Committed By: andvar
Date: Wed Dec 13 22:53:04 UTC 2023
Modified Files:
src/sys/arch/sparc64/dev: vnet.c
Log Message:
Make NBPFILTER build by adopting NetBSD's bpf_mtap() interface and definitions.
Condition is also not needed, since this check is performed inside function.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc64/dev/vnet.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sparc64/dev/vnet.c
diff -u src/sys/arch/sparc64/dev/vnet.c:1.7 src/sys/arch/sparc64/dev/vnet.c:1.8
--- src/sys/arch/sparc64/dev/vnet.c:1.7 Sun Sep 18 13:31:08 2022
+++ src/sys/arch/sparc64/dev/vnet.c Wed Dec 13 22:53:04 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: vnet.c,v 1.7 2022/09/18 13:31:08 thorpej Exp $ */
+/* $NetBSD: vnet.c,v 1.8 2023/12/13 22:53:04 andvar Exp $ */
/* $OpenBSD: vnet.c,v 1.62 2020/07/10 13:26:36 patrick Exp $ */
/*
* Copyright (c) 2009, 2015 Mark Kettenis
@@ -1206,12 +1206,9 @@ vnet_start(struct ifnet *ifp)
* If BPF is listening on this interface, let it see the
* packet before we commit it to the wire.
*/
- if (ifp->if_bpf)
- {
- DPRINTF(("%s: before bpf\n", __func__));
- bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);
- DPRINTF(("%s: after bpf\n", __func__));
- }
+ DPRINTF(("%s: before bpf\n", __func__));
+ bpf_mtap(ifp, m, BPF_D_OUT);
+ DPRINTF(("%s: after bpf\n", __func__));
#endif
pmap_extract(pmap_kernel(), (vaddr_t)buf, &pa);
@@ -1286,8 +1283,7 @@ vnet_start_desc(struct ifnet *ifp)
* If BPF is listening on this interface, let it see the
* packet before we commit it to the wire.
*/
- if (ifp->if_bpf)
- bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);
+ bpf_mtap(ifp, m, BPF_D_OUT);
#endif
pmap_extract(pmap_kernel(), (vaddr_t)buf, &pa);