Multicast broken on x86_64 (Patch Included)

From: Brian Childs
Date: Thu Feb 26 2004 - 11:36:40 EST


csum-partial.c in 2.4.25 and 2.6.3 has a bug that causes it to compute
the checksum incorrectly.

As a result, multicast doesn't work. It looks as though iptables is
also affected.

Anyway, here's a simple patch.

Brian

diff -ruN linux-2.4.25-orig/arch/x86_64/lib/csum-partial.c linux-2.4.25/arch/x86_64/lib/csum-partial.c
--- linux-2.4.25-orig/arch/x86_64/lib/csum-partial.c 2003-06-13 10:51:32.000000000 -0400
+++ linux-2.4.25/arch/x86_64/lib/csum-partial.c 2004-02-26 11:20:17.000000000 -0500
@@ -141,6 +141,6 @@
*/
unsigned short ip_compute_csum(unsigned char * buff, int len)
{
- return ~csum_partial(buff,len,0);
+ return csum_fold(csum_partial(buff,len,0));
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/