Skip to content

Commit

Permalink
net: ipv6: add NLM_F_APPEND in notifications when applicable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Ahern authored and David S. Miller committed Feb 1, 2017
1 parent f696186 commit 1f5e29c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/ipv6/ip6_fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1f5e29c

Please sign in to comment.