Skip to contentSkip to conversation

Multicast broken on x86_64 (Patch Included)

PATCH Brian Childs 1 participant 1 message Feb 26, 2004

lore
Share & tools
lore
#0 lore raw

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

arch/x86_64/lib/csum-partial.c +1 -1
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
@@ -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));
 }