Bug 129823 - need to check if checksum computed or not before "bad udp cksum" indicated
need to check if checksum computed or not before "bad udp cksum" indicated
Product: Fedora
Classification: Fedora
Component: tcpdump (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Martin Stransky
: FutureFeature
: 136618 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2004-08-12 18:38 EDT by Jason Vas Dias
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-02 08:15:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jason Vas Dias 2004-08-12 18:38:57 EDT
Description of problem:

For the latest kernels (2.6.7-+) with ethernet cards such as
those controlled by the e1000 driver, the card (not the kernel)
computes the IP & UDP checksums, so when tcpdump gets the packet,
they will be incorrect, and tcpdump reports a "bad udp cksum"
for the packet, which can be confusing. Bug 129778 was incorrectly
raised as a kernel bug on this issue.

David Miller, the kernel developer I consulted on this, writes:
The value in the checksum field is the pseudo-checksum, which
the card uses to compute the final checksum.  It could be
different on every single packet.

The AF_PACKET socket, which tcpdump uses to capture packets,
does have available a TP_STATUS_CSUMNOTREADY flag it can
check for this purpose.  But it is only available when
mmap()'s packet capturing is in use.

So tcpdump should be using this flag to check if the checksum
has been computed before complaining about 'bad udp cksum' .

How reproducible:
100% - on every UDP packet

Steps to Reproduce:
1. tcpdump an interface for a card such as Intel 82540EP (e1000
driver) with a 2.6.7+ kernel.
Actual results:

All UDP packets show "[bad udp cksum xxxx!]" .

Expected results:

TCP should not show this error message - perhaps
it should show something like "[cksum not ready]" .

Additional info:
Comment 1 Harald Hoyer 2004-10-21 04:54:44 EDT
*** Bug 136618 has been marked as a duplicate of this bug. ***
Comment 2 Tomas Mraz 2004-10-21 04:58:13 EDT
This applies to Ethereal too.

Note You need to log in before you can comment on or make changes to this bug.