Subject: [tsvwg] [Technical Errata Reported] RFC4960 (3423)

From: RFC Errata System <[email-masked]>
Date: Sat, 1 Dec 2012 15:42:42 -0800 (PST)

The following errata report has been submitted for RFC4960,
"Stream Control Transmission Protocol".

--------------------------------------
You may review the report below and at:
http://www.rfc-editor.org/errata_search.php?rfc=4960&eid=3423

--------------------------------------
Type: Technical
Reported by: Pontus Andersson <[email-masked]>

Section: B

Original Text
-------------
   unsigned long
   generate_crc32c(unsigned char *buffer, unsigned int length)
   {
     unsigned int i;
     unsigned long crc32 = ~0L;

Corrected Text
--------------
   unsigned long
   generate_crc32c(unsigned char *buffer, unsigned int length)
   {
     unsigned int i;
     unsigned long crc32 = 0xffffffffL;

Notes
-----
The remainder register (crc32) should be initialized to 0xffffffffL rather than ~0L, for correct operation on platforms where unisigned long is longer than 32 bits. I.e., 64-bit platforms.

Instructions:
-------------
This errata is currently posted as "Reported". If necessary, please
use "Reply All" to discuss whether it should be verified or
rejected. When a decision is reached, the verifying party (IESG)
can log in to change the status and edit the report, if necessary. 

--------------------------------------
RFC4960 (draft-ietf-tsvwg-2960bis-05)
--------------------------------------
Title               : Stream Control Transmission Protocol
Publication Date    : September 2007
Author(s)           : R. Stewart, Ed.
Category            : PROPOSED STANDARD
Source              : Transport Area Working Group
Area                : Transport
Stream              : IETF
Verifying Party     : IESG

---

From: Michael Tuexen <[email-masked]>
Date: Sun, 2 Dec 2012 10:22:38 +0100

> "Stream Control Transmission Protocol".
I would actually prefer to make use of uint32_t as the type of crc32. At least this
is what we do in the FreeBSD implementation and that runs fine on all architectures.

Best regards
Michael

---

From: Randy Stewart <[email-masked]>
Date: Sun, 16 Dec 2012 09:38:17 -0500

Michael:

I agree! But as to the actual Errata.. this is correct as
well. It should be 0xffffffff not 0.

The use of uint32_t is much better since it avoids the issues surrounding
int's and longs (for those in the editors office, a long on a 32 bit machine is
a 32 bit int, a long on a 64 bit machine is a 64 bit number .. of course I speak
of Unix type O/S's.. other O/S's may not have this issue, but I think clarity
here is most important ;-D)

R

>> The remainder register (crc32) should be initialized to 0xffffffffL rather than ~0L, for correct operation on platforms where unisigned long is longer than 32 bits. I.e., 64-bit platforms.

-----
Randall Stewart
[email-masked]