Skip to contentSkip to conversation

net: ipv6: add NLM_F_APPEND in notifications when applicable

PATCH In review David Ahern 2 participants 2 messages Feb 1, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
sending this one outside of the multipath patch set since it has nothing to do with multipath.

 net/ipv6/ip6_fib.c | 3 +++
 1 file changed, 3 insertions(+)
net/ipv6/ip6_fib.c +3 -0
index ef5485204522..bcaf247232d7 100644
@@ -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) {
Signature · 1 line
2.1.4
maintainer
#1 lore raw

From: David Ahern <[email protected]>
Date: Tue, 31 Jan 2017 16:51:37 -0800

Quoted 8 lines

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.

---
sending this one outside of the multipath patch set since it has nothing to do with multipath.

Looks good Dave, applied, thank you.