Skip to contentSkip to conversation

net/ipv6: init ip6 anycast rt->dst.input as ip6_input

PATCH In review Hangbin Liu 3 participants 3 messages Aug 23, 2018

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

PATCH 1/1 net/ipv6: init ip6 anycast rt->dst.input as ip6_input

Commit 6edb3c96a5f02 ("net/ipv6: Defer initialization of dst to data path") forgot to handle anycast route and init anycast rt->dst.input to ip6_forward. Fix it by setting anycast rt->dst.input back to ip6_input.

Fixes 6edb3c96a5f02 ("net/ipv6: Defer initialization of dst to data path")
---
 net/ipv6/route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/route.c +1 -1
index 7208c16..c4ea13e 100644
@@ -956,7 +956,7 @@ static void ip6_rt_init_dst(struct rt6_info *rt, struct fib6_info *ort)
 	rt->dst.error = 0;
 	rt->dst.output = ip6_output;
 
-	if (ort->fib6_type == RTN_LOCAL) {
+	if (ort->fib6_type == RTN_LOCAL || ort->fib6_type == RTN_ANYCAST) {
 		rt->dst.input = ip6_input;
 	} else if (ipv6_addr_type(&ort->fib6_dst.addr) & IPV6_ADDR_MULTICAST) {
 		rt->dst.input = ip6_mc_input;
Signature · 1 line
2.5.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Hangbin Liu

Commit 6edb3c96a5f02 ("net/ipv6: Defer initialization of dst to data path") forgot to handle anycast route and init anycast rt->dst.input to ip6_forward. Fix it by setting anycast rt->dst.input back to ip6_input.

Fixes 6edb3c96a5f02 ("net/ipv6: Defer initialization of dst to data path")
---
 net/ipv6/route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Good catch.

maintainer
#2 lore raw
In reply to Hangbin Liu

From: Hangbin Liu <[email protected]>
Date: Thu, 23 Aug 2018 11:31:37 +0800

Quoted 6 lines

Commit 6edb3c96a5f02 ("net/ipv6: Defer initialization of dst to data path") forgot to handle anycast route and init anycast rt->dst.input to ip6_forward. Fix it by setting anycast rt->dst.input back to ip6_input.

Fixes 6edb3c96a5f02 ("net/ipv6: Defer initialization of dst to data path")

Applied and queued up for -stable, thanks.