diff options
author | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2021-09-20 01:27:24 +0000 |
---|---|---|
committer | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2021-09-20 01:27:24 +0000 |
commit | d8d431792b47f8c5c9b867f81d0dfd4f9dbc2753 (patch) | |
tree | 2b31835f47789fb246f5d637672a3f980356b1a3 /sys | |
parent | 8a8b0cd838e90184493459e7b38b1fe39a358e3e (diff) |
wire up bpf correctly
ok dlg@ deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_aq_pci.c | 12 |
1 files changed, 9 insertions, 3 deletions
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 <sys/types.h> #include <sys/device.h> #include <sys/param.h> @@ -95,6 +97,10 @@ #include <dev/pci/pcivar.h> #include <dev/pci/pcidevs.h> +#if NBPFILTER > 0 +#include <net/bpf.h> +#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); |