netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/ipv6: init ip6 anycast rt->dst.input as ip6_input
@ 2018-08-23  3:31 Hangbin Liu
  2018-08-23  3:39 ` David Ahern
  2018-08-23  4:53 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Hangbin Liu @ 2018-08-23  3:31 UTC (permalink / raw)
  To: netdev; +Cc: David Ahern, David S. Miller, 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")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 net/ipv6/route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 7208c16..c4ea13e 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -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;
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/ipv6: init ip6 anycast rt->dst.input as ip6_input
  2018-08-23  3:31 [PATCH] net/ipv6: init ip6 anycast rt->dst.input as ip6_input Hangbin Liu
@ 2018-08-23  3:39 ` David Ahern
  2018-08-23  4:53 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2018-08-23  3:39 UTC (permalink / raw)
  To: Hangbin Liu, netdev; +Cc: David S. Miller

On 8/22/18 9:31 PM, Hangbin Liu wrote:
> 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")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---
>  net/ipv6/route.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Good catch.

Reviewed-by: David Ahern <dsahern@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/ipv6: init ip6 anycast rt->dst.input as ip6_input
  2018-08-23  3:31 [PATCH] net/ipv6: init ip6 anycast rt->dst.input as ip6_input Hangbin Liu
  2018-08-23  3:39 ` David Ahern
@ 2018-08-23  4:53 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-08-23  4:53 UTC (permalink / raw)
  To: liuhangbin; +Cc: netdev, dsahern

From: Hangbin Liu <liuhangbin@gmail.com>
Date: Thu, 23 Aug 2018 11:31:37 +0800

> 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")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-23  8:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-23  3:31 [PATCH] net/ipv6: init ip6 anycast rt->dst.input as ip6_input Hangbin Liu
2018-08-23  3:39 ` David Ahern
2018-08-23  4:53 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).