git: 9df6eeabb379 - main - bpf: Add missing NOP stubs

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Wed, 08 Feb 2023 10:06:41 UTC
The branch main has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=9df6eeabb379b0816d58b05a4de24fc0478e1dba

commit 9df6eeabb379b0816d58b05a4de24fc0478e1dba
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2023-02-08 04:35:02 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2023-02-08 10:05:21 +0000

    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 <garyj@gmx.de>
    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 ffac63ef95d9..43eed04375d7 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)
 {