git: 4f41ff7ced8a - stable/14 - IfAPI: fix LINT-NOIP build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 03 Sep 2025 18:57:52 UTC
The branch stable/14 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=4f41ff7ced8a2fa6fc7ba35023b161567323282b commit 4f41ff7ced8a2fa6fc7ba35023b161567323282b Author: Ka Ho Ng <khng@FreeBSD.org> AuthorDate: 2025-09-03 18:47:27 +0000 Commit: Ka Ho Ng <khng@FreeBSD.org> CommitDate: 2025-09-03 18:47:27 +0000 IfAPI: fix LINT-NOIP build Also, reimplement the wrappers with __strong_reference macro. Fixes: 7b3094df479f Reported by: zlei Sponsored by: Juniper Networks, Inc. Reviewed by: zlei, jhibbits Differential Revision: https://reviews.freebsd.org/D52362 --- sys/net/bpf.c | 2 ++ sys/net/if.c | 12 ------------ sys/net/if_ethersubr.c | 2 ++ 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index de56f3db782f..a5222c3659c7 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -3223,6 +3223,8 @@ bpf_validate(const struct bpf_insn *f, int len) #endif /* !DEV_BPF && !NETGRAPH_BPF */ +__strong_reference(bpf_mtap_if, if_bpfmtap); + #ifdef DDB static void bpf_show_bpf_if(struct bpf_if *bpf_if) diff --git a/sys/net/if.c b/sys/net/if.c index a3fb237e3f96..f308edd24734 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4866,18 +4866,6 @@ if_gethandle(u_char type) return (if_alloc(type)); } -void -if_bpfmtap(if_t ifp, struct mbuf *m) -{ - bpf_mtap_if(ifp, m); -} - -void -if_etherbpfmtap(if_t ifp, struct mbuf *m) -{ - ether_bpf_mtap_if(ifp, m); -} - void if_vlancap(if_t ifp) { diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index baf3a27c2e7e..b0e459dd1bdf 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1545,5 +1545,7 @@ ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) ether_gen_addr_byname(if_name(ifp), hwaddr); } +__strong_reference(ether_bpf_mtap_if, if_etherbpfmtap); + DECLARE_MODULE(ether, ether_mod, SI_SUB_INIT_IF, SI_ORDER_ANY); MODULE_VERSION(ether, 1);