From: David Stevens [EMAIL PROTECTED]
Date: Fri, 10 Nov 2006 09:54:58 -0800
The Internet checksum is defined as a 1's-complement sum, so if the
alternate 0 does not have a special meaning in a protocol, then by
1's-complement arithmetic, 0 == ~0.
So, it looks to me without the
On Mon, Nov 13, 2006 at 04:50:58PM -0800, David Miller wrote:
From: David Stevens [EMAIL PROTECTED]
Date: Fri, 10 Nov 2006 09:54:58 -0800
The Internet checksum is defined as a 1's-complement sum, so if the
alternate 0 does not have a special meaning in a protocol, then by
1's-complement
David Miller [EMAIL PROTECTED] wrote on 11/13/2006 04:50:58 PM:
Puzzling :-) Then why is the transformation only performed for
UDP in the ipv4 stack? It seems by your logic TCP would need
to either do the if (sum==0) sum=~0; thing or it would need
to accept both 0 and ~0 in the checksum
On Mon, Nov 13, 2006 at 05:44:12PM -0800, David Stevens wrote:
That's actually what I was suggesting. In 1's-complement,
~0 == -0 which is still 0, so barring any special case (like UDP's
0 means no checksum rule), it should be equally valid for a
packet to have 0 or ~0 as the checksum
This is a discussion about Brian's SECOND PATCH which needs
fixups.
Please forget about the second patch, optimizing this code path isn't
worth it if the -1 trick doesn't work in all cases.
-Brian
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to
Only change upper-layer checksum from 0 to 0x for UDP (as RFC 768
states), not for others as RFC 4443 doesn't require it.
Signed-off-by: Brian Haley [EMAIL PROTECTED]
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 81bd45b..dbb9b1f 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@
Sorry, I saw this discussion a little late...
The Internet checksum is defined as a 1's-complement sum, so if the
alternate 0 does not have a special meaning in a protocol, then by
1's-complement arithmetic, 0 == ~0.
So, it looks to me without the remapping that a valid checksum
may also
From: Brian Haley [EMAIL PROTECTED]
Date: Fri, 10 Nov 2006 11:24:45 -0500
Only change upper-layer checksum from 0 to 0x for UDP (as RFC 768
states), not for others as RFC 4443 doesn't require it.
Signed-off-by: Brian Haley [EMAIL PROTECTED]
Applied, thanks Brian.
-
To unsubscribe from
David Miller wrote:
From: Brian Haley [EMAIL PROTECTED]
Date: Fri, 10 Nov 2006 11:24:45 -0500
Only change upper-layer checksum from 0 to 0x for UDP (as RFC 768
states), not for others as RFC 4443 doesn't require it.
Signed-off-by: Brian Haley [EMAIL PROTECTED]
Applied, thanks Brian.
From: Nivedita Singhvi [EMAIL PROTECTED]
Date: Fri, 10 Nov 2006 15:17:06 -0800
WATCH YOUR QUOTING!
David Miller wrote:
From: Brian Haley [EMAIL PROTECTED]
Date: Fri, 10 Nov 2006 11:24:45 -0500
Only change upper-layer checksum from 0 to 0x for UDP (as RFC 768
states), not for
David Miller wrote:
From: Nivedita Singhvi [EMAIL PROTECTED]
Date: Fri, 10 Nov 2006 15:17:06 -0800
WATCH YOUR QUOTING!
That explains it! Arg! Sorry, DaveM, a bit on autopilot
trying to put some tests together..
thanks,
Nivedita
-
To unsubscribe from this list: send the line unsubscribe
11 matches
Mail list logo