public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH net-next] ipv6: host should probe those non-reachable router
@ 2013-11-01  2:47 Duan Jiong
  2013-11-01 11:19 ` Hannes Frederic Sowa
  0 siblings, 1 reply; 2+ messages in thread
From: Duan Jiong @ 2013-11-01  2:47 UTC (permalink / raw)
  To: David Miller; +Cc: hannes, netdev, duanj.fnst


rather than those routers that the return value of rt6_score_route()
is RT6_NUD_SUCCEED.

Signed-off-by: Duan Jiong <duanj.fnst@cn•fujitsu.com>
---
 net/ipv6/route.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 1ac0b6e..b7bf5c7 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -623,12 +623,11 @@ static struct rt6_info *find_match(struct rt6_info *rt, int oif, int strict,
 		match_do_rr = true;
 		m = 0; /* lowest valid score */
 	} else if (m < 0) {
+		if (strict & RT6_LOOKUP_F_REACHABLE)
+			rt6_probe(rt);
 		goto out;
 	}
 
-	if (strict & RT6_LOOKUP_F_REACHABLE)
-		rt6_probe(rt);
-
 	if (m > *mpri) {
 		*do_rr = match_do_rr;
 		*mpri = m;
-- 
1.8.3.1

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

* Re: [PATCH net-next] ipv6: host should probe those non-reachable router
  2013-11-01  2:47 [PATCH net-next] ipv6: host should probe those non-reachable router Duan Jiong
@ 2013-11-01 11:19 ` Hannes Frederic Sowa
  0 siblings, 0 replies; 2+ messages in thread
From: Hannes Frederic Sowa @ 2013-11-01 11:19 UTC (permalink / raw)
  To: Duan Jiong; +Cc: David Miller, netdev

Hi Duan!

On Fri, Nov 01, 2013 at 10:47:15AM +0800, Duan Jiong wrote:
> 
> rather than those routers that the return value of rt6_score_route()
> is RT6_NUD_SUCCEED.
> 
> Signed-off-by: Duan Jiong <duanj.fnst@cn•fujitsu.com>
> ---
>  net/ipv6/route.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index 1ac0b6e..b7bf5c7 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -623,12 +623,11 @@ static struct rt6_info *find_match(struct rt6_info *rt, int oif, int strict,
>  		match_do_rr = true;
>  		m = 0; /* lowest valid score */
>  	} else if (m < 0) {
> +		if (strict & RT6_LOOKUP_F_REACHABLE)
> +			rt6_probe(rt);
>  		goto out;
>  	}
>  
> -	if (strict & RT6_LOOKUP_F_REACHABLE)
> -		rt6_probe(rt);
> -

I don't think this is correct. m < 0 are the routers we really don't want to
use, e.g. because we get a failure signaled from rt6_check_dev. E.g. we want
to query a route where a specified interface id is given.

In case router preference is enabled we mostly give back RT6_NUD_SUCCEED for
routes which are somewhat reachable. Really broken routers in NUD_FAILED state
are waiting for cleanup and recreation. We also do not accept new NAs on
neighbours in NUD_FAILED state IIRC.

Greetings,

  Hannes

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

end of thread, other threads:[~2013-11-01 11:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-01  2:47 [PATCH net-next] ipv6: host should probe those non-reachable router Duan Jiong
2013-11-01 11:19 ` Hannes Frederic Sowa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox