tech-net archive

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

Re: 4.0.1 NAT checksum failure?



On Tue, 5 Apr 2011 23:41:53 -0400 (EDT)
der Mouse <mouse%Rodents-Montreal.ORG@localhost> wrote:

> Well, not TCP4, because this isn't TCP; it happens even on pings.  But
> presumably IP-layer checksums have similar bits.

Indeed

> Also, it's not just checksum offload; all network interfaces on this
> machine are configured with no checksum offload, even the ones that are
> capable of doing it.  I definitely need to focus on the checksum code,
> though since it's a checksum issue that's been obvious from the start.

Oh, I didn't even notice that those were listed as capabilities but
indeed disabled, or they'd also show on the first line.  Sorry about
that.

In case this can help any (this could have changed since netbsd-4), but
in netbsd-5 where I'm more familiar with code location, I seem to see
calls to in_delayed_cksum() in sys/netinet/ip_output.c which calls
in4_cksum.c's in4_cksum(), in turn using cpu_in_cksum.c's
cpu_in_cksum() (I've not checked but it'd be possible for each arch to
supply its own perhaps).  It seems somewhat tricky as the offset/length
are parameters that could be wrongly passed in any caller.
Then in sys/dist/ipf/netinet/ there are a number of matching lines for
cksum as well, including in ip_nat.c ...

Good night and happy debugging,
-- 
Matt


Home | Main Index | Thread Index | Old Index