aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index a972a6641ed5..b39ae99122d5 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -380,10 +380,11 @@ static struct rt6_info *rt6_select(struct rt6_info **head, int oif,
380 continue; 380 continue;
381 381
382 if (m > mpri) { 382 if (m > mpri) {
383 rt6_probe(match); 383 if (strict & RT6_LOOKUP_F_REACHABLE)
384 rt6_probe(match);
384 match = rt; 385 match = rt;
385 mpri = m; 386 mpri = m;
386 } else { 387 } else if (strict & RT6_LOOKUP_F_REACHABLE) {
387 rt6_probe(rt); 388 rt6_probe(rt);
388 } 389 }
389 } 390 }
@@ -636,7 +637,7 @@ static struct rt6_info *ip6_pol_route_input(struct fib6_table *table,
636 int strict = 0; 637 int strict = 0;
637 int attempts = 3; 638 int attempts = 3;
638 int err; 639 int err;
639 int reachable = RT6_LOOKUP_F_REACHABLE; 640 int reachable = ipv6_devconf.forwarding ? 0 : RT6_LOOKUP_F_REACHABLE;
640 641
641 strict |= flags & RT6_LOOKUP_F_IFACE; 642 strict |= flags & RT6_LOOKUP_F_IFACE;
642 643
@@ -733,7 +734,7 @@ static struct rt6_info *ip6_pol_route_output(struct fib6_table *table,
733 int strict = 0; 734 int strict = 0;
734 int attempts = 3; 735 int attempts = 3;
735 int err; 736 int err;
736 int reachable = RT6_LOOKUP_F_REACHABLE; 737 int reachable = ipv6_devconf.forwarding ? 0 : RT6_LOOKUP_F_REACHABLE;
737 738
738 strict |= flags & RT6_LOOKUP_F_IFACE; 739 strict |= flags & RT6_LOOKUP_F_IFACE;
739 740