netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roberto Nibali <ratz@drugphish.ch>
To: Pradeep Vincent <pradeep.vincent@gmail.com>
Cc: linux-kernel@vger.kernel.org, torvalds@osdl.org, netdev@vger.kernel.org
Subject: Re: [Patch] 2.4.32 - Neighbour Cache (ARP) State machine bug Fixed
Date: Mon, 28 Nov 2005 22:40:05 +0100	[thread overview]
Message-ID: <438B7935.8050604@drugphish.ch> (raw)
In-Reply-To: <9fda5f510511281257o364acb3gd634f8e412cd7301@mail.gmail.com>

> 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.

Regarding NUD_REACHABLE <-> NUD_STALE transition it has a timer check.
Due to the fast path it's not enabled per default. Use neigh_sync() to
check, although I believe the installed tasklet does this for you already.

The knowledgeable netdev people will know better.

> 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.

How do you use VMACs in 2.4.x?

> 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
> */
> 
> #include <linux/config.h>
> @@ -705,6 +706,14 @@
>                        neigh_release(n);
>                        continue;
>                }
> +
> +               /* Mark it stale - To be reconfirmed later when used */
> +               if (n->nud_state&NUD_REACHABLE &&
> +                   now - n->confirmed > n->parms->reachable_time) {
> +                       n->nud_state = NUD_STALE;
> +                       neigh_suspect(n);
> +               }
> +

If this is really a problem, why not simply call neigh_sync()? Your
patch also seems to be whitespace damaged.

>                write_unlock(&n->lock);
> 
> next_elt:

I've cc'd netdev since this is where such patches should go for
discussion; left Linus in the loop (netiquette) although he's nothing to
do with this ;).

Cheers,
Roberto Nibali, ratz
-- 
echo
'[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc

       reply	other threads:[~2005-11-28 21:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9fda5f510511281257o364acb3gd634f8e412cd7301@mail.gmail.com>
2005-11-28 21:40 ` Roberto Nibali [this message]
2006-02-04  2:06 ` Fwd: [Patch] 2.4.32 - Neighbour Cache (ARP) State machine bug Fixed 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
2006-02-08  2:13           ` Grant Coady
2006-02-10 20:35             ` Bill Davidsen
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=438B7935.8050604@drugphish.ch \
    --to=ratz@drugphish.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pradeep.vincent@gmail.com \
    --cc=torvalds@osdl.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;
as well as URLs for NNTP newsgroup(s).