From 5b7f73c4a34bc9105fb3f29fce8161e3b8dce5ea Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Tue, 25 Sep 2018 14:40:43 +0200 Subject: [PATCH] kernel/pflog: Fix a recently introduced regression. The recently added #ifdef (in a6ccd68b08eff10c57551f8fe92f39a5b8ae6c48) used the wrong name (NBPFILTER) and thereby effectively disabled the bpfattach. Fix it to the right name (NBPF), include the necessary use_bpf.h and while here, also fix another such case for detaching. Reported-by: Peeter Must --- sys/net/pf/if_pflog.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/net/pf/if_pflog.c b/sys/net/pf/if_pflog.c index c2fa0d8d98..a826f9ab45 100644 --- a/sys/net/pf/if_pflog.c +++ b/sys/net/pf/if_pflog.c @@ -37,6 +37,7 @@ #include "opt_inet.h" #include "opt_inet6.h" +#include "use_bpf.h" #include #include @@ -137,7 +138,7 @@ pflog_clone_create(struct if_clone *ifc, int unit, caddr_t param __unused) ifp->if_hdrlen = PFLOG_HDRLEN; if_attach(ifp, NULL); -#if NBPFILTER > 0 +#if NBPF > 0 bpfattach(&pflogif->sc_if, DLT_PFLOG, PFLOG_HDRLEN); #endif @@ -164,7 +165,7 @@ pflog_clone_destroy(struct ifnet *ifp) crit_exit(); lwkt_reltoken(&pf_token); -#if NBPFILTER > 0 +#if NBPF > 0 bpfdetach(ifp); #endif if_detach(ifp); -- 2.41.0