]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sctp: Fix crc32c calculations on big-endian arhes.
authorVlad Yasevich <vladislav.yasevich@hp.com>
Thu, 22 Jan 2009 22:52:23 +0000 (14:52 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Feb 2009 17:46:19 +0000 (09:46 -0800)
commitd8e466e2cc8e9e4e033c9994f2d598276d60d409
treef9eb44fe4e24047d889ff1dda6ac14e45c93ea47
parent88c1b28bebdb058813e38856fe7b52a0dfbe4cca
sctp: Fix crc32c calculations on big-endian arhes.

[ Upstream commit 9c5ff5f75d0d0a1c7928ecfae3f38418b51a88e3 ]

crc32c algorithm provides a byteswaped result.  On little-endian
arches, the result ends up in big-endian/network byte order.
On big-endinan arches, the result ends up in little-endian
order and needs to be byte swapped again.  Thus calling cpu_to_le32
gives the right output.

Tested-by: Jukka Taimisto <jukka.taimisto@mail.suomi.net>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/net/sctp/checksum.h