Subject: Re: UDP problems with NetBSD 3.0_BETA
To: Matthias Scheler <tron@zhadum.de>
From: Jonathan Stone <jonathan@dsg.stanford.edu>
List: tech-net
Date: 04/13/2005 14:39:35
In message <d3k0mb$iim$1@colwyn.zhadum.de>,Matthias Scheler writes:
>In article <d3jrjs$hmf$1@colwyn.zhadum.de>,
>	tron@zhadum.de (Matthias Scheler) writes:
>> after upgrading my server from NetBSD 2.0.2 to 3.0_BETA its clients started
>> to experience DNS service problems. "netstat -s -p udp" suggested that
>> the problem is related to UDP packets with bad checksums.
>[...]
>> Any ideas?
>
>Wolfgang S. Rupprecht suggested to make the following changes with "sysctl":
>
>net.inet.ip.do_loopback_cksum=1
>net.inet.tcp.do_loopback_cksum=1
>net.inet.udp.do_loopback_cksum=1
>net.inet6.tcp6.do_loopback_cksum=1
>net.inet6.udp6.do_loopback_cksum=1
>
>And that fixed the problem. But why is that necessary?

Because someone decided to implement the bogus ``optimization'' of not
doing transport-level checksums for packets routed over local-loopback
interfaces.The sole justification was benchmarking comparisons
against other OSes which do this bogus optimization. Linux is frequently
mentioned in that context.

The really frustrating thing about this, from my perspective, is that
I was party to a conversation between Linus Torvalds, Larry McVoy,
Mary Baker, and others (Usenix 96, if memory serves) where Mary
explained that the optimization *was* bogus: what the networking
research community had been asking for, was a better networking stack
for *real* networking, not just better local-loopback benchmarks.
As I recall, Linus said: ``....  oh.''.

Sigh...

If it were up to me, I'd simply back out this ``optimization': if it
isn't working properly, then it shouldn't have gone in before 3.0 was
branched.  Tho', I am aware that others see it differently.