All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Gadbois <martin.gadbois@colubris.com>
To: linux-kernel@vger.kernel.org, ddavem@redhat.com
Cc: ak@muc.de, kuznet@ms2.inr.ac.ru
Subject: [PATCH] IP forwarded checksum, kernel 2.2.18-19
Date: Wed, 18 Apr 2001 11:20:49 -0400	[thread overview]
Message-ID: <3ADDB0D1.826456E2@colubris.com> (raw)

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)




             reply	other threads:[~2001-04-18 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-18 15:20 Martin Gadbois [this message]
2001-04-18 19:21 ` [PATCH] IP forwarded checksum, kernel 2.2.18-19 David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ADDB0D1.826456E2@colubris.com \
    --to=martin.gadbois@colubris.com \
    --cc=ak@muc.de \
    --cc=ddavem@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.