netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] neigh: Netlink notification for administrative NUD state change
@ 2013-12-15 21:39 Bob Gilligan
  2013-12-16  8:23 ` Nicolas Dichtel
  2013-12-17 21:15 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Bob Gilligan @ 2013-12-15 21:39 UTC (permalink / raw)
  To: davem; +Cc: nicolas.dichtel, netdev


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 an administrative 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.  This means
that netlink listeners will not hear about administrative NUD state
changes such as from a resolved state to PERMANENT.

This patch changes the neighbor code to generate an RTM_NEWNEIGH
message when the NUD state of an entry is changed administratively.

Signed-off-by: Bob Gilligan <gilligan@aristanetworks.com>
---

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 6072610..7f0e838 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1161,6 +1161,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
 						 neigh->parms->reachable_time :
 						 0)));
 		neigh->nud_state = new;
+		notify = 1;
 	}
 
 	if (lladdr != neigh->ha) {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] neigh: Netlink notification for administrative NUD state change
  2013-12-15 21:39 [PATCH] neigh: Netlink notification for administrative NUD state change Bob Gilligan
@ 2013-12-16  8:23 ` Nicolas Dichtel
  2013-12-17 21:15 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Dichtel @ 2013-12-16  8:23 UTC (permalink / raw)
  To: Bob Gilligan, davem; +Cc: netdev

Le 15/12/2013 22:39, Bob Gilligan a écrit :
>
> 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 an administrative 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.  This means
> that netlink listeners will not hear about administrative NUD state
> changes such as from a resolved state to PERMANENT.
>
> This patch changes the neighbor code to generate an RTM_NEWNEIGH
> message when the NUD state of an entry is changed administratively.
>
> Signed-off-by: Bob Gilligan <gilligan@aristanetworks.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] neigh: Netlink notification for administrative NUD state change
  2013-12-15 21:39 [PATCH] neigh: Netlink notification for administrative NUD state change Bob Gilligan
  2013-12-16  8:23 ` Nicolas Dichtel
@ 2013-12-17 21:15 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2013-12-17 21:15 UTC (permalink / raw)
  To: gilligan; +Cc: nicolas.dichtel, netdev

From: Bob Gilligan <gilligan@aristanetworks.com>
Date: Sun, 15 Dec 2013 13:39:56 -0800

> 
> 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 an administrative 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.  This means
> that netlink listeners will not hear about administrative NUD state
> changes such as from a resolved state to PERMANENT.
> 
> This patch changes the neighbor code to generate an RTM_NEWNEIGH
> message when the NUD state of an entry is changed administratively.
> 
> Signed-off-by: Bob Gilligan <gilligan@aristanetworks.com>

Applied, thanks Bob.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-17 21:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-15 21:39 [PATCH] neigh: Netlink notification for administrative NUD state change Bob Gilligan
2013-12-16  8:23 ` Nicolas Dichtel
2013-12-17 21:15 ` David Miller

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