public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IP forwarded checksum, kernel 2.2.18-19
@ 2001-04-18 15:20 Martin Gadbois
  2001-04-18 19:21 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Gadbois @ 2001-04-18 15:20 UTC (permalink / raw)
  To: linux-kernel, ddavem; +Cc: ak, kuznet

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)




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

end of thread, other threads:[~2001-04-18 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-18 15:20 [PATCH] IP forwarded checksum, kernel 2.2.18-19 Martin Gadbois
2001-04-18 19:21 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox