From: Pradeep Vincent <pradeep.vincent@gmail.com>
To: Willy Tarreau <willy@w.ods.org>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [Patch] 2.4.32 - Neighbour Cache (ARP) State machine bug Fixed
Date: Tue, 7 Feb 2006 17:50:03 -0800 [thread overview]
Message-ID: <9fda5f510602071750o53f76fc8gc94c280a9998343d@mail.gmail.com> (raw)
In-Reply-To: <20060207215341.GC11380@w.ods.org>
[-- Attachment #1: Type: text/plain, Size: 2887 bytes --]
One more attempt. Attaching the diff file as well.
Signed off by: Pradeep Vincent <pradeep.vincent@gmail.com>
--- old/net/core/neighbour.c Wed Nov 9 16:48:10 2005
+++ new/net/core/neighbour.c Tue Feb 7 17:38:26 2006
@@ -14,6 +14,7 @@
* Vitaly E. Lavrov releasing NULL neighbor in neigh_add.
* Harald Welte Add neighbour cache statistics like rtstat
* Harald Welte port neighbour cache rework from 2.6.9-rcX
+ * Pradeep Vincent fix neighbour cache state machine
*/
#include <linux/config.h>
@@ -705,6 +706,13 @@
neigh_release(n);
continue;
}
+ /* Move to NUD_STALE state */
+ if (n->nud_state&NUD_REACHABLE &&
+ now - n->confirmed > n->parms->reachable_time) {
+ n->nud_state = NUD_STALE;
+ neigh_suspect(n);
+ }
+
write_unlock(&n->lock);
next_elt:
Thanks,
Pradeep
On 2/7/06, Willy Tarreau <willy@w.ods.org> wrote:
> Hi,
>
> On Tue, Feb 07, 2006 at 12:57:43AM -0700, Pradeep Vincent wrote:
> > In 2.4.21, arp code uses gc_timer to check for stale arp cache
> > entries. In 2.6, each entry has its own timer to check for stale arp
> > cache. 2.4.29 to 2.4.32 kernels (atleast) use neither of these timers.
> > This causes problems in environments where IPs or MACs are reassigned
> > - saw this problem on load balancing router based networks that use
> > VMACs. Tested this code on load balancing router based networks as
> > well as peer-linux systems.
> >
> >
> > Thanks,
> >
> >
> > Signed off by: Pradeep Vincent <pradeep.vincent@gmail.com>
> >
> > diff -Naur old/net/core/neighbour.c new/net/core/neighbour.c
> > --- old/net/core/neighbour.c Wed Nov 23 17:15:30 2005
> > +++ new/net/core/neighbour.c Wed Nov 23 17:26:01 2005
> > @@ -14,6 +14,7 @@
> > * Vitaly E. Lavrov releasing NULL neighbor in neigh_add.
> > * Harald Welte Add neighbour cache statistics like rtstat
> > * Harald Welte port neighbour cache rework from 2.6.9-rcX
> > + * Pradeep Vincent Move neighbour cache entry to stale state
> > */
>
> As you can see above, your mailer is still broken. Leading spaces get
> removed and it seems like tabs are replaced with spaces. This makes it
> really annoying to fix by hand because we all have to do your work again.
> You should try to fix your mailer options, possibly by sending a few
> mails to yourself or someone else (if you send *a few* mails to me, I
> can confirm which one looks OK). If your mailer is definitely broken,
> then you may send it as plain text first (for review), with a text
> attachment for people to apply it without trouble.
>
> Thanks,
> Willy
>
>
[-- Attachment #2: linux-2.4.29-arp-fix.patch --]
[-- Type: application/octet-stream, Size: 691 bytes --]
--- old/net/core/neighbour.c Wed Nov 9 16:48:10 2005
+++ new/net/core/neighbour.c Tue Feb 7 17:38:26 2006
@@ -14,6 +14,7 @@
* Vitaly E. Lavrov releasing NULL neighbor in neigh_add.
* Harald Welte Add neighbour cache statistics like rtstat
* Harald Welte port neighbour cache rework from 2.6.9-rcX
+ * Pradeep Vincent fix neighbour cache state machine
*/
#include <linux/config.h>
@@ -705,6 +706,13 @@
neigh_release(n);
continue;
}
+ /* Move to NUD_STALE state */
+ if (n->nud_state&NUD_REACHABLE &&
+ now - n->confirmed > n->parms->reachable_time) {
+ n->nud_state = NUD_STALE;
+ neigh_suspect(n);
+ }
+
write_unlock(&n->lock);
next_elt:
next prev parent reply other threads:[~2006-02-08 1:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-28 20:57 Pradeep Vincent
2005-11-28 21:40 ` Roberto Nibali
2006-02-04 2:06 ` Fwd: " Pradeep Vincent
2006-02-04 2:18 ` David S. Miller
2006-02-07 7:57 ` Pradeep Vincent
2006-02-07 21:53 ` Willy Tarreau
2006-02-08 1:50 ` Pradeep Vincent [this message]
2006-02-08 2:13 ` Grant Coady
2006-02-10 20:35 ` Bill Davidsen
2005-11-28 21:02 Pradeep Vincent
2005-11-29 20:42 Pradeep Vincent
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=9fda5f510602071750o53f76fc8gc94c280a9998343d@mail.gmail.com \
--to=pradeep.vincent@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=willy@w.ods.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®