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
This commit is contained in:
Ka Ho Ng 2025-09-03 18:47:27 +00:00 committed by Franco Fichtner
parent c63ca22395
commit f53bffb156
3 changed files with 4 additions and 12 deletions

View file

@ -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)

View file

@ -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)
{

View file

@ -1551,5 +1551,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);