diff --git a/sys/net/bpf.c b/sys/net/bpf.c --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -3223,6 +3223,8 @@ #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 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4866,18 +4866,6 @@ 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 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1545,5 +1545,7 @@ 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);