public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind•com>
To: Bob Gilligan <gilligan@aristanetworks•com>, netdev@vger•kernel.org
Subject: Re: No netlink notification for user-initiated NUD state change
Date: Tue, 10 Dec 2013 18:15:48 +0100	[thread overview]
Message-ID: <52A74C44.9060600@6wind.com> (raw)
In-Reply-To: <529558B7.5000506@aristanetworks.com>

Le 27/11/2013 03:28, Bob Gilligan a écrit :
> Hi -- The neighbour code sends up an RTM_NEWNEIGH netlink notification
> if the NUD state of a neighbour cache entry is changed by a timer (e.g.
> from REACHABLE to STALE), even if the lladdr of the entry has not changed.
>
> But a user-initiated change to the the NUD state of a neighbour cache
> entry that does not change the lladdr (e.g. via "ip -4 neigh change ...
> nud ...") does not trigger a netlink notification.
>
> I'm wondering if that is intended behavior?  Is there any reason not to
> send a netlink notification in this case?  The situation we've seen
> where it would be nice to have these notifications is if a user changes
> an existing resolved entry to PERMANENT.
>
> This one-line change to neigh_update() would trigger netlink
> notifications on all user-initiated state changes:
>
> Index: linux-3.12.1/net/core/neighbour.c
> ===================================================================
> --- linux-3.12.1.orig/net/core/neighbour.c
> +++ linux-3.12.1/net/core/neighbour.c
> @@ -1161,6 +1161,7 @@ int neigh_update(struct neighbour *neigh
>
> neigh->parms->reachable_time :
>                                                   0)));
>                  neigh->nud_state = new;
> +               notify = 1;
>          }
>
>          if (lladdr != neigh->ha) {
>
>
>
> I'd be happy to submit a properly formatted patch if there's agreement
> that this is an issue.
I think this patch is good, please could you submit it properly?

      reply	other threads:[~2013-12-10 17:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-27  2:28 No netlink notification for user-initiated NUD state change Bob Gilligan
2013-12-10 17:15 ` Nicolas Dichtel [this message]

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=52A74C44.9060600@6wind.com \
    --to=nicolas.dichtel@6wind$(echo .)com \
    --cc=gilligan@aristanetworks$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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