mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: zhongyu <xxx_pku@yahoo.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: ARP bug and a patch
Date: Sat, 17 Nov 2001 19:37:50 +0800	[thread overview]
Message-ID: <20011117114042Z281339-17408+15401@vger.kernel.org> (raw)

	Bug's description :
	A computer has two ethernet cards connected to the same hub, each ethernet card was in a
different logical sub net and turn on the ip_forward on each ethernet card. Dozens of ARP request
packet will cause a "neibour table overflow"
error then the netcard can not work .
	reason:
	The arp_rcv fuction would call the ip_route_input function to build the dst entry of the skb.
When the ip_forward is on , the code will run direct into the rt_intern_hash fuction which add the
target ip to the neighbour buffer . 
	patch:

diff -Naur linux-2.4.9/net/ipv4/route.c linux-2.4.9n/net/ipv4/route.c
--- linux-2.4.9/net/ipv4/route.c        Fri Nov 16 17:19:06 2001
+++ linux-2.4.9n/net/ipv4/route.c       Fri Nov 16 17:17:59 2001
@@ -1501,6 +1501,12 @@
        }
 #endif

+       if (skb->protocol == __constant_htons(ETH_P_ARP)){      
+               skb->dst = rth;
+               err = 0;
+               goto done;
+       }
+       
 intern:
        err = rt_intern_hash(hash, rth, (struct rtable**)&skb->dst);
 done:

          zhongyu
            xxx_pku@yahoo.com


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


                 reply	other threads:[~2001-11-17 11:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20011117114042Z281339-17408+15401@vger.kernel.org \
    --to=xxx_pku@yahoo.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®