diff options
author | rrs <rrs@FreeBSD.org> | 2007-04-14 09:44:09 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2007-04-14 09:44:09 +0000 |
commit | fb6f6fd9a183da8573afa302e42cdf7684785a7d (patch) | |
tree | 083a217af386adf4fcec65b47183061eed4b0685 /sys/netinet/sctp_crc32.c | |
parent | 571c5243e40d0546bb093ffb58ebf6e6476cfaba (diff) | |
download | FreeBSD-src-fb6f6fd9a183da8573afa302e42cdf7684785a7d.zip FreeBSD-src-fb6f6fd9a183da8573afa302e42cdf7684785a7d.tar.gz |
- fix source address selection when picking an acceptable address
- name change of prefered -> preferred
- CMT fast recover code added.
- Comment fixes in CMT.
- We were not giving a reason of cant_start_asoc per socket api
if we failed to get init/or/cookie to bring up an assoc. Change
so we don't just give a generic "comm lost" but look at actual
states of dying assoc.
- change "crc32" arguments to "crc32c" to silence strict/noisy
compiler warnings when crc32() is also declared
- A few minor tweaks to get the portable stuff truely portable
for sctp6_usrreq.c :-D
- one-2-one style vrf match problem.
- window recovery would leave chks marked for retran
during window probes on the sent queue. This would then
cause an out-of-order problem and assure that the flight
size "problem" would occur.
- Solves a flight size logging issue that caused rwnd
overruns, flight size off as well as false retransmissions.g
- Macroize the up and down of flight size.
- Fix a ECNE bug in its counting.
- The strict_sacks options was causing aborts when window probing
was active, fix to make strict sacks a bit smarter about what
the next unsent TSN is.
- Fixes a one-2-one wakeup bug found by Martin Kulas.
- If-defed out form, Andre's copy routines pending his
commit of at least m_last().. need to adjust for 6.2 as
well.. since m_last won't exist.
Reviewed by: gnn
Diffstat (limited to 'sys/netinet/sctp_crc32.c')
-rw-r--r-- | sys/netinet/sctp_crc32.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/netinet/sctp_crc32.c b/sys/netinet/sctp_crc32.c index 47f5483..8f4d8fe 100644 --- a/sys/netinet/sctp_crc32.c +++ b/sys/netinet/sctp_crc32.c @@ -579,17 +579,17 @@ sctp_crc32c_sb8_64_bit(uint32_t crc, * none */ uint32_t -update_crc32(uint32_t crc32, +update_crc32(uint32_t crc32c, unsigned char *buffer, unsigned int length) { uint32_t offset; if (length == 0) { - return (crc32); + return (crc32c); } offset = ((uintptr_t) buffer) & 0x3; - return (sctp_crc32c_sb8_64_bit(crc32, buffer, length, offset)); + return (sctp_crc32c_sb8_64_bit(crc32c, buffer, length, offset)); } uint32_t sctp_crc_c[256] = { @@ -663,21 +663,21 @@ uint32_t sctp_crc_c[256] = { #define SCTP_CRC32C(c,d) (c=(c>>8)^sctp_crc_c[(c^(d))&0xFF]) uint32_t -old_update_crc32(uint32_t crc32, +old_update_crc32(uint32_t crc32c, unsigned char *buffer, unsigned int length) { unsigned int i; for (i = 0; i < length; i++) { - SCTP_CRC32C(crc32, buffer[i]); + SCTP_CRC32C(crc32c, buffer[i]); } - return (crc32); + return (crc32c); } uint32_t -sctp_csum_finalize(uint32_t crc32) +sctp_csum_finalize(uint32_t crc32c) { uint32_t result; @@ -686,7 +686,7 @@ sctp_csum_finalize(uint32_t crc32) #endif /* Complement the result */ - result = ~crc32; + result = ~crc32c; #if BYTE_ORDER == BIG_ENDIAN /* * For BIG-ENDIAN.. aka Motorola byte order the result is in @@ -697,16 +697,16 @@ sctp_csum_finalize(uint32_t crc32) byte1 = (result >> 8) & 0x000000ff; byte2 = (result >> 16) & 0x000000ff; byte3 = (result >> 24) & 0x000000ff; - crc32 = ((byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3); + crc32c = ((byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3); #else /* * For INTEL platforms the result comes out in network order. No * htonl is required or the swap above. So we optimize out both the * htonl and the manual swap above. */ - crc32 = result; + crc32c = result; #endif - return (crc32); + return (crc32c); } #endif |