All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ECN target wrong tcp csum on little endian
@ 2003-01-09 14:50 Harald Welte
  2003-01-10  8:57 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Harald Welte @ 2003-01-09 14:50 UTC (permalink / raw)
  To: David Miller; +Cc: Netfilter Development Mailinglist

[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]

Hi Dave!

This is another patch of the series of patches you will receive from me today.

Please apply to 2.4.x and 2.5.x, thanks.


Author: Patrick McHardy <kaber@trash.net>

The 2.4.20 kernel included the new iptables 'ECN' target, enabling a selective
ECN disable mechanism.   Unfortunately there was a bug in the incremental TCP
checksum update, resulting in broken TCP checksums on little endian machines.
This patch fixes the Bug.


--- linux.old/net/ipv4/netfilter/ipt_ECN.c.orig	2002-12-09 23:14:20.000000000 +0100
+++ linux/net/ipv4/netfilter/ipt_ECN.c	2002-12-09 23:13:27.000000000 +0100
@@ -88,8 +88,8 @@
 	}
 	
 	if (diffs[0] != *tcpflags) {
-		diffs[0] = htons(diffs[0]) ^ 0xFFFF;
-		diffs[1] = htons(*tcpflags);
+		diffs[0] = diffs[0] ^ 0xFFFF;
+		diffs[1] = *tcpflags;
 		tcph->check = csum_fold(csum_partial((char *)diffs,
 		                                    sizeof(diffs),
 		                                    tcph->check^0xFFFF));

-- 
- Harald Welte / laforge@gnumonks.org               http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
 as I'm the dictator."  --  George W. Bush Dec 18, 2000

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ECN target wrong tcp csum on little endian
  2003-01-09 14:50 [PATCH] ECN target wrong tcp csum on little endian Harald Welte
@ 2003-01-10  8:57 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2003-01-10  8:57 UTC (permalink / raw)
  To: laforge; +Cc: netfilter-devel

   From: Harald Welte <laforge@gnumonks.org>
   Date: Thu, 9 Jan 2003 15:50:46 +0100

   Author: Patrick McHardy <kaber@trash.net>
   
   The 2.4.20 kernel included the new iptables 'ECN' target, enabling a selective
   ECN disable mechanism.   Unfortunately there was a bug in the incremental TCP
   checksum update, resulting in broken TCP checksums on little endian machines.
   This patch fixes the Bug.
   
Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-10  8:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-09 14:50 [PATCH] ECN target wrong tcp csum on little endian Harald Welte
2003-01-10  8:57 ` David S. Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.