From: David Ahern Date: Wed, 1 Feb 2017 00:51:37 +0000 (-0800) Subject: net: ipv6: add NLM_F_APPEND in notifications when applicable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1f5e29ce7989eb75652774004b962ee1eb6e56ca;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: ipv6: add NLM_F_APPEND in notifications when applicable IPv6 does not set the NLM_F_APPEND flag in notifications to signal that a NEWROUTE is an append versus a new route or a replaced one. Add the flag if the request has it. Signed-off-by: David Ahern Signed-off-by: David S. Miller --- diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index ef5485204522..febde6c112bf 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -746,6 +746,9 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt, u16 nlflags = NLM_F_EXCL; int err; + if (info->nlh && (info->nlh->nlmsg_flags & NLM_F_APPEND)) + nlflags |= NLM_F_APPEND; + ins = &fn->leaf; for (iter = fn->leaf; iter; iter = iter->dst.rt6_next) {