No netlink notification for user-initiated NUD state change
Subsystems (2)
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:
net/core/neighbour.c +0 -0
@@ -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.
Bob.
Quoted 32 lines · Bob Gilligan
Hi -- The neighbour code sends up an
RTM_NEWNEIGHnetlink 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
===================================================================net/core/neighbour.c +0
-0@@ -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) {
Quoted 2 lines
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?