From 9df6eeabb379b0816d58b05a4de24fc0478e1dba Mon Sep 17 00:00:00 2001 From: Zhenlei Huang Date: Wed, 8 Feb 2023 12:35:02 +0800 Subject: [PATCH] bpf: Add missing NOP stubs This fixes kernel build with nodevice bpf [1]. [1] https://lists.freebsd.org/archives/freebsd-current/2023-February/003178.html Reported by: Gary Jennejohn Reviewed by: jhibbits Fixes: 950cc1f44fbd bpf: Add "_if" tap APIs Differential Revision: https://reviews.freebsd.org/D38432 --- sys/net/bpf.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index ffac63ef95d..43eed04375d 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -3120,16 +3120,31 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen) { } +void +bpf_tap_if(if_t ifp, u_char *pkt, u_int pktlen) +{ +} + void bpf_mtap(struct bpf_if *bp, struct mbuf *m) { } +void +bpf_mtap_if(if_t ifp, struct mbuf *m) +{ +} + void bpf_mtap2(struct bpf_if *bp, void *d, u_int l, struct mbuf *m) { } +void +bpf_mtap2_if(if_t ifp, void *data, u_int dlen, struct mbuf *m) +{ +} + void bpfattach(struct ifnet *ifp, u_int dlt, u_int hdrlen) {