From: jmatthew Date: Mon, 20 Sep 2021 01:27:23 +0000 (+0000) Subject: wire up bpf correctly X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=66048eb6f31b7d07e1f70d540c7b2a801e3a1611;p=openbsd wire up bpf correctly ok dlg@ deraadt@ --- diff --git a/sys/dev/pci/if_aq_pci.c b/sys/dev/pci/if_aq_pci.c index 12785537072..930bdd4c2cc 100644 --- a/sys/dev/pci/if_aq_pci.c +++ b/sys/dev/pci/if_aq_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_aq_pci.c,v 1.2 2021/09/20 01:18:00 jmatthew Exp $ */ +/* $OpenBSD: if_aq_pci.c,v 1.3 2021/09/20 01:27:23 jmatthew Exp $ */ /* $NetBSD: if_aq.c,v 1.27 2021/06/16 00:21:18 riastradh Exp $ */ /* @@ -78,6 +78,8 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ +#include "bpfilter.h" + #include #include #include @@ -95,6 +97,10 @@ #include #include +#if NBPFILTER > 0 +#include +#endif + /* #define AQ_DEBUG 1 */ #ifdef AQ_DEBUG #define DPRINTF(x) printf x @@ -2294,8 +2300,8 @@ aq_start(struct ifqueue *ifq) as->as_m = m; #if NBPFILTER > 0 - if (ifp->if_bpf) - bpf_mtap_ether(ifp->if_bpf, m, BPF_DIRECTION_OUT); + if (ifq->ifq_if->if_bpf) + bpf_mtap_ether(ifq->ifq_if->if_bpf, m, BPF_DIRECTION_OUT); #endif bus_dmamap_sync(sc->sc_dmat, as->as_map, 0, as->as_map->dm_mapsize, BUS_DMASYNC_PREWRITE);