lkml.org 
[lkml]   [2001]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] IP forwarded checksum, kernel 2.2.18-19
Hi there!
I realized that some tests were failing due to dropped IP packets. I
traced and discovered the following:

--------Begin patch
# This caused some "holes" in forwarded transfers, that is checksum was
bad
# on some occasions -MG
diff -ur original/include/net/ip.h mpc8xx-2.2.18/include/net/ip.h
--- original/include/net/ip.h Tue Apr 17 09:36:28 2001
+++ linux-2.2.18/include/net/ip.h Tue Apr 17 16:30:16 2001
@@ -170,7 +170,7 @@
extern __inline__
int ip_decrease_ttl(struct iphdr *iph)
{
- u16 check = iph->check;
+ u32 check = iph->check;
check += __constant_htons(0x0100);
iph->check = check + (check>=0xFFFF);
return --iph->ttl;
------------End patch
The expression check>=0xFFFF could only be true(1) when (u16)check ==
0xFFFF, not what is it meant to be.
This is fixed exactly like this patch in 2.4.x.
Kernel 2.2.19 also has the same problems.
Thanks,

--
Martin Gadbois
S/W designer
Colubris Networks (http://www.colubris.com)



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

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.042 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site