-/* $OpenBSD: if.c,v 1.630 2021/02/20 01:11:43 dlg Exp $ */
+/* $OpenBSD: if.c,v 1.631 2021/02/20 04:37:26 dlg Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
ifp->if_rtrequest = if_rtrequest_dummy;
if (ifp->if_enqueue == NULL)
ifp->if_enqueue = if_enqueue_ifq;
+#if NBPFILTER > 0
+ if (ifp->if_bpf_mtap == NULL)
+ ifp->if_bpf_mtap = bpf_mtap_ether;
+#endif
ifp->if_llprio = IFQ_DEFPRIO;
}
#if NBPFILTER > 0
if_bpf = ifp->if_bpf;
if (if_bpf) {
- if (bpf_mtap_ether(if_bpf, m, BPF_DIRECTION_IN)) {
+ if ((*ifp->if_bpf_mtap)(if_bpf, m, BPF_DIRECTION_IN)) {
m_freem(m);
return;
}
-/* $OpenBSD: ifq.c,v 1.42 2021/02/20 01:11:44 dlg Exp $ */
+/* $OpenBSD: ifq.c,v 1.43 2021/02/20 04:37:26 dlg Exp $ */
/*
* Copyright (c) 2015 David Gwynne <dlg@openbsd.org>
ml_init(ml);
while ((m = ml_dequeue(&ml0)) != NULL) {
- if (bpf_mtap_ether(if_bpf, m, BPF_DIRECTION_IN))
+ if ((*ifp->if_bpf_mtap)(if_bpf, m, BPF_DIRECTION_IN))
m_freem(m);
else
ml_enqueue(ml, m);