tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: panic: mbuf too short for IPv6 header



On Sun, May 04, 2008 at 01:00:29PM +0200, Manuel Bouyer wrote:
> +     i = off + sizeof(*icmp6);
> +     if ((m->m_len < i || M_READONLY(m)) && (m = m_pullup(m, i)) == 0) {
> +             ICMP6_STATINC(ICMP6_STAT_TOOSHORT);
> +             icmp6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_error);
> +             goto freeit;
> +     }

You can write that more succinctly with M_UNWRITABLE().

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933 ext 24


Home | Main Index | Thread Index | Old Index