aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorRoopa Prabhu <roopa@cumulusnetworks.com>2018-09-22 21:26:20 -0700
committerDavid S. Miller <davem@davemloft.net>2018-09-24 12:21:32 -0700
commitfc6e8073f304010605f834cb2eb8c07c46461c9d (patch)
treed3f4fecf55349f4de7a7c8a9f3faafb394632d20 /net/core
parentneighbour: allow admin to set NTF_ROUTER (diff)
downloadlinux-dev-fc6e8073f304010605f834cb2eb8c07c46461c9d.tar.xz
linux-dev-fc6e8073f304010605f834cb2eb8c07c46461c9d.zip
neighbour: send netlink notification if NTF_ROUTER changes
send netlink notification if neigh_update results in NTF_ROUTER change and if NEIGH_UPDATE_F_ISROUTER is on. Also move the NTF_ROUTER change function into a helper. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/neighbour.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 0e1cad89184f..20e0d3308148 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1280,11 +1280,8 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
neigh->arp_queue_len_bytes = 0;
}
out:
- if (update_isrouter) {
- neigh->flags = (flags & NEIGH_UPDATE_F_ISROUTER) ?
- (neigh->flags | NTF_ROUTER) :
- (neigh->flags & ~NTF_ROUTER);
- }
+ if (update_isrouter)
+ neigh_update_is_router(neigh, flags, &notify);
write_unlock_bh(&neigh->lock);
if (notify)