UDP checksum calculation correct?

461 views
Skip to first unread message

midi...@googlemail.com

unread,
Oct 7, 2015, 12:39:40 AM10/7/15
to ostinato
Is the UDP checksum calculated correctly by ostinato?
If I'm not wrong the UDP checksum should be calculated as described in RFC768.
In there it's said that a calculated checksum of 0x0000 should be replaced by 0xFFFF. That doesn't seem to happen in ostinato.
I have attached a file with an ostinato stream for which a checksum of 0x0000 is calculated.

Best regards Markus
UDP_checksum_test

Srivats P

unread,
Oct 7, 2015, 9:25:50 AM10/7/15
to midi...@googlemail.com, ostinato
Markus,

You are right - Ostinato is not replacing 0 with 0xFFFF as it should
according to the RFC. UDP checksum 0 indicates "no checksum", so
receiver will not do a checksum verification which is not the
intention here.

Please file a bug and I'll fix it.

Note: It looks like this replacing 0 with 0xFFFF business should be
done only for UDP and not for TCP?

Srivats
> --
> Get Ostinato News and Updates on Twitter - Follow @ostinato
> (http://twitter.com/ostinato)
> ---
> You received this message because you are subscribed to the Google Groups
> "ostinato" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ostinato+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
http://ostinato.org/
@ostinato

midi...@googlemail.com

unread,
Oct 7, 2015, 10:44:04 AM10/7/15
to ostinato, midi...@googlemail.com
I do not have a GitHub account, that's why I have reported that here.
I think it is correct that this only applies to the UDP checksum and not to the IP header checksum, but I'm not a 100% sure.

Markus

Srivats P

unread,
Oct 7, 2015, 11:01:29 AM10/7/15
to Markus Wiedemann, ostinato
Ok. I filed https://github.com/pstavirs/ostinato/issues/160

Thanks for reporting the issue.

Srivats

Srivats P

unread,
Oct 7, 2015, 11:15:21 AM10/7/15
to Markus Wiedemann, ostinato
I've pushed the fix to the repository.

Srivats
--
http://ostinato.org/
@ostinato

midi...@googlemail.com

unread,
Oct 7, 2015, 11:18:42 AM10/7/15
to ostinato, midi...@googlemail.com
Great. I'm glad that I could help.

Markus

Am Mittwoch, 7. Oktober 2015 06:39:40 UTC+2 schrieb midi...@googlemail.com:
Reply all
Reply to author
Forward
0 new messages