Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Duan Jiong and committed by
David S. Miller
ba486502 83a1a7ce

+1 -1
+1 -1
net/ipv6/route.c
··· 619 619 goto out; 620 620 621 621 m = rt6_score_route(rt, oif, strict); 622 - if (m == RT6_NUD_FAIL_SOFT && !IS_ENABLED(CONFIG_IPV6_ROUTER_PREF)) { 622 + if (m == RT6_NUD_FAIL_SOFT) { 623 623 match_do_rr = true; 624 624 m = 0; /* lowest valid score */ 625 625 } else if (m < 0) {