[En-Nut-Discussion] IP Checksum calculation broken. Reenabled old algorithm for the meantime.

Ole Reinhardt ole.reinhardt at embedded-it.de
Sun Jun 17 22:56:22 CEST 2012


Hi all,

I just discovered that the new IP checksum calculation which was
introduced a few month ago is broken for some situations. I could not
find a concrete reason so far, but I think it's an alignment question.

It definately does not depend on the data nor the size, as the problem
here occurs on the ICMP checksum calculation which is always the same
size and AFAIK also the same data. In 50% of the time it works, the
other 50% not.

And if it's wrong for one packet it will be wrong for all packets, which
leads me to the conclusion, that it depends on some external reason like
e.g. the address where the network buffer is located (might differ a
little depending on the time the network conncetion is setup).

But these are just some thoughts, further evaluation must follow...

For the meantime I defined NUT_LEGACY_IPCSUM in nut/net/ipcsum.c which
enables the old algorithm again. With this implementation all problems
are gone at my side...

@Harald: Do you have any ideas what I could do for better testing and
evaluating the problem?

Best regards,

Ole Reinhardt

-- 

Thermotemp GmbH, Embedded-IT

Embedded Hard-/ Software and Open Source Development, 
Integration and Consulting

http://www.embedded-it.de

Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen - 
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97

Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280 




More information about the En-Nut-Discussion mailing list