summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_fib.c
diff options
context:
space:
mode:
authorDavid Ahern <dsa@cumulusnetworks.com>2017-01-31 16:51:37 -0800
committerDavid S. Miller <davem@davemloft.net>2017-02-01 12:13:52 -0500
commit1f5e29ce7989eb75652774004b962ee1eb6e56ca (patch)
tree835203d24f61b2cb1a7de942872df6474c88f7df /net/ipv6/ip6_fib.c
parentf696186203076770f51eb5890712e696e6bb72d7 (diff)
downloadblackbird-op-linux-1f5e29ce7989eb75652774004b962ee1eb6e56ca.tar.gz
blackbird-op-linux-1f5e29ce7989eb75652774004b962ee1eb6e56ca.zip
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 <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_fib.c')
-rw-r--r--net/ipv6/ip6_fib.c3
1 files changed, 3 insertions, 0 deletions
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) {
OpenPOWER on IntegriCloud