tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: checking m->m_pkthdr.csum_flags in ip_output()
Hi,
In message <20080415.203216.41648300.taca%back-street.net@localhost>
on Tue, 15 Apr 2008 20:32:16 +0900 (JST),
Takahiro Kambe <taca%back-street.net@localhost> wrote:
> Today, NetBSD 4.0_STABLE machine paniced in ip_output() when
> forwarding IPv4 multicast packet. The packet was short (36 octets)
> UDP/IP pakcet.
...
> The kernel has DIAGNOSTIC option enabled and corresponding code
> fragments in ip_output().
>
> #ifdef DIAGNOSTIC
> if ((m->m_flags & M_PKTHDR) == 0)
> panic("ip_output: no HDR");
>
> if ((m->m_pkthdr.csum_flags & (M_CSUM_TCPv6|M_CSUM_UDPv6)) != 0) {
> panic("ip_output: IPv6 checksum offload flags: %d",
> m->m_pkthdr.csum_flags);
> }
>
> if ((m->m_pkthdr.csum_flags & (M_CSUM_TCPv4|M_CSUM_UDPv4)) ==
> (M_CSUM_TCPv4|M_CSUM_UDPv4)) {
> panic("ip_output: conflicting checksum offload flags: %d",
> m->m_pkthdr.csum_flags);
> }
> #endif
>
> It seems that this diagnostic code checking M_CSUM_TCPv4 and
> M_CSUM_UDPv4 are exclusive one.
I confirmed that bge(4) sets both M_CSUM_TCPv4 and M_CSUM_UDPv4 to
m->m_pkthdr.csum_flags with usual unicast IP packets.
I don't know it is bug of bge(4) or above DIAGNOSTIC is wrong or
obsolete.
--
Takahiro Kambe <taca%back-street.net@localhost>
Home |
Main Index |
Thread Index |
Old Index