[Bug 930962] Re: dhcp3-server reports many bad udp checksums to syslog using virtio NIC
Martijn Lievaart
930962 at bugs.launchpad.net
Tue Jan 8 14:01:32 UTC 2013
> On 7 January 2013 23:13, Martijn Lievaart <930962 at bugs.launchpad.net> wrote:
>> According to my cursory reading of relevant RFCs and a quick wireshark
>> session, the bug is in KVM virtio. An UDP packet should contain a
>> checksum field of 0 for no checksum, or a correct checksum. I see bogus
>> values coming in.
>>
>> OTOH, wireshark warns that this may be due to offloading, so I may not
>> be correct in this analysis.
>
> This is due to virtio implementing 'offloading' by returning random
> garbage in the checksum field.
>
> Since the code to calculate the checksumis not present this offloading
> cannot be turned off.
>
> Since kernel has interface to inform applications that offloading is
> on it is a bug in the application to interpret the bogus checksum.
> Presumably the card has already checked it and did not bother passing
> it on.
Hi Michal,
I don't quite understand what you are saying here. Are you saying that
because Linux has a kernel interface to check for offloading, any and
all application (that cares about udp checksums) should use this? It
would seem much simpler if the virtio driver zero'd the checksum field,
any application already should be able to handle that. No Linux specific
code needed.
Martijn
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/930962
Title:
dhcp3-server reports many bad udp checksums to syslog using virtio NIC
Status in “isc-dhcp” package in Ubuntu:
Confirmed
Bug description:
Tested with dhcp3-server ver. 3.1.3-2ubuntu3.3 in Ubuntu 10.04.3
Server, x64.
The DHCP server reports that UDP packets sent to it have bad
checksums:
Feb 11 06:57:18 ... dhcpd: 5 bad udp checksums in 5 packets
Feb 11 06:58:22 ... dhcpd: last message repeated 7 times
Feb 11 06:59:17 ... dhcpd: last message repeated 7 times
The DHCP server host is a KVM virtual machine using a virtio-based
virtual NIC.
This problem has been reported for other distros using KVM and virtio:
https://bugs.mageia.org/show_bug.cgi?id=1243
http://www.mail-archive.com/kvm@vger.kernel.org/msg41958.html
- suggests using iptables to write in a checksum
http://pkgs.fedoraproject.org/gitweb/?p=dhcp.git;a=blob;f=dhcp-4.2.2-xen-checksum.patch;h=038d346d726e131f1ab2579fe015a72b49733a0d;hb=HEAD
- Fedora patch to dhcp to avoid this
The simplest workaround is to change the virtual NIC type from virtio
to Intel e1000 in KVM. Apparently this driver calculates checksums.
But virtio is the default driver type.
Thanks,
Tim Miller Dyck
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/930962/+subscriptions
More information about the foundations-bugs
mailing list