Ethereal-dev: Re: [Ethereal-dev] udp checksum incorrect

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Radek Vokal <rvokal@xxxxxxxxxx>
Date: Fri, 22 Oct 2004 09:51:38 +0200
On Thu, 2004-10-21 at 09:39 -0700, Guy Harris wrote:
> Radek Vokal wrote:
> 
> >  anyone experienced this: When I'm doing ping and capture UDP packets
> > (I'm usind UDP encapsulation) with ethereal there's incorrect udp-
> > checksum.
> 
> I.e., Ethereal reports that the UDP checksum is incorrect?

See the attached file. It shows request which has wrong checksum and
respons which seems to be ok. 

> 
> > I've tested this on different machines and it appears only on
> > FC2 with different NIC.
> 
> (I assume "FC2" means Fedora Core 2.)

Yes, I'm on Fedora Core 2 (sorry for the abbreviation, I'm too used to
it) NICs I've tested this on are intels and starfire. As I realized,
they both have zero copy issue and as I was told, the checksum of
packets I send will only be calculated when they go over the wire. Maybe
that's the problem, but I saw this happen only with TCP and ICMP. 

> 
> Does it appear on all NICs?  If so, do those NICs support offloading UDP 
> checksums, as well as TCP checksums?  If they support offloading UDP 
> checksums, this might be the same problem that's seen with NICs that 
> support TCP checksum offloading:
> 
> 	http://www.ethereal.com/faq#q5.14
> 
> > My questio is: How is ethereal computing the
> > correct checksum?
> 
> It uses code based on BSD's Internet checksum code.
> 
> > Is the ethereal one computed using libpcap
> 
> No.
> 
> > or is it vice versa?
> 
> No.  It's independent of libpcap - which contains no checksum code, 
> although recent versions of tcpdump do have checksum code and does the 
> same sort of checking Ethereal does.
> Tcpdump might correctly handle packets with source-routing IP options; I 
> don't think Ethereal would currently do so.

Ok

Radek

> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
--
Radek Vokál <rvokal@xxxxxxxxxx> -- Red Hat, Inc.

Linux 2.6.8-1.521smp #1 SMP Mon Aug 16 09:25:06 EDT 2004 i686 GNU/Linux

Attachment: udp_checksum
Description: Binary data