summaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>2013-10-30 15:39:26 +0800
committerDavid S. Miller <davem@davemloft.net>2013-10-30 17:06:51 -0400
commitba4865027c11d7ac8e5a33e0624dd415caab2027 (patch)
treefe2a96ea102f20bea2dfb679d61b8fcfbd3e90fb /net/ipv6/route.c
parent83a1a7ce600b21611753b2265b6469651a722013 (diff)
downloadlinux-ba4865027c11d7ac8e5a33e0624dd415caab2027.tar.gz
linux-ba4865027c11d7ac8e5a33e0624dd415caab2027.tar.bz2
linux-ba4865027c11d7ac8e5a33e0624dd415caab2027.zip
ipv6: remove the unnecessary statement in find_match()
After reading the function rt6_check_neigh(), we can know that the RT6_NUD_FAIL_SOFT can be returned only when the IS_ENABLE(CONFIG_IPV6_ROUTER_PREF) is false. so in function find_match(), there is no need to execute the statement !IS_ENABLED(CONFIG_IPV6_ROUTER_PREF). Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 5dc6ca6b6686..1ac0b6e17d95 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -619,7 +619,7 @@ static struct rt6_info *find_match(struct rt6_info *rt, int oif, int strict,
goto out;
m = rt6_score_route(rt, oif, strict);
- if (m == RT6_NUD_FAIL_SOFT && !IS_ENABLED(CONFIG_IPV6_ROUTER_PREF)) {
+ if (m == RT6_NUD_FAIL_SOFT) {
match_do_rr = true;
m = 0; /* lowest valid score */
} else if (m < 0) {