On 05/01/16(Tue) 12:29, Håkon Lerring wrote:
> Hello misc.
> 
> I was investigating a problem with a firewall that goes AWOL every week. It
> happens only if i activate an ipv6 address on a carp interface. The carp log
> has this message:
> 
> Jan  5 12:10:06 <hostname> /bsd: carp: packet size 48 too small
> 
> I think i have narrowed down the leak to the handling of too small
> ipv6-packets:
> 
> --- ip_carp.c.orig    2016-01-05 12:18:03.000000000 +0100
> +++ ip_carp.c 2016-01-05 12:18:30.000000000 +0100
> @@ -562,6 +562,7 @@
>       if ((m = m_pullup(m, *offp + sizeof(*ch))) == NULL) {
>               carpstats.carps_badlen++;
>               CARP_LOG(LOG_INFO, sc, ("packet size %u too small", len));
> +             m_freem(m);
>               return (IPPROTO_DONE);
>       }
>       ch = (struct carp_header *)(mtod(m, caddr_t) + *offp);
> 
> 
> I have not yet tested this patch since this is a production system. Why the
> other machine is sending incomplete packets is another question i'm currently
> investigating.

This is unlikely to be the leak you're chasing, m_pullup(9) frees the
mbuf for you in the error case.

> A meta-question: is this an appropriate channel for this or should i send such
> reports to bugs@?

bugs@ or tech@ if you have a diff.  In any case provide at least the
informations described in sendbug(1), because it's impossible to know
which version you're running for example, what's your setup, when does
this happens, etc.

Reply via email to