Hi Sashan,

* Alexandr Nedvedicky <[email protected]> [2020-11-05 00:25]:
> Hello Ralf,
> 
> I think we should rather give a try diff below. I would rather add
> a return after m_freem(). Will diff below work for you too?

Without understanding the full background I went with ignoring the return value
of bpf_mtap_ether because other calls in bridge, etherip, gre, switch, trunk,
vlan do so as well. And ip_carp.c up to 1.343 did ignore the return value as
well.

Anyway, I will give it a try to see whether it works.

Regards,
Ralf

> --------8<---------------8<---------------8<------------------8<--------
> diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
> index 0d52cffa606..4cfe18eaf1c 100644
> --- a/sys/netinet/ip_carp.c
> +++ b/sys/netinet/ip_carp.c
> @@ -2283,8 +2283,10 @@ carp_transmit(struct carp_softc *sc, struct ifnet 
> *ifp0, struct mbuf *m)
>       {
>               caddr_t if_bpf = ifp->if_bpf;
>               if (if_bpf) {
> -                     if (bpf_mtap_ether(if_bpf, m, BPF_DIRECTION_OUT))
> +                     if (bpf_mtap_ether(if_bpf, m, BPF_DIRECTION_OUT)) {
>                               m_freem(m);
> +                             return;
> +                     }
>               }
>       }
>  #endif /* NBPFILTER > 0 */

Reply via email to