netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6: remove the unnecessary statement in find_match()
@ 2013-10-30  7:39 Duan Jiong
  2013-10-30  9:44 ` Hannes Frederic Sowa
  2013-10-30 21:08 ` David Miller
  0 siblings, 2 replies; 10+ messages in thread
From: Duan Jiong @ 2013-10-30  7:39 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, duanj.fnst


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>
---
 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 f54e3a1..708685f 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) {
-- 
1.8.3.1

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

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

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30  7:39 [PATCH] ipv6: remove the unnecessary statement in find_match() Duan Jiong
2013-10-30  9:44 ` Hannes Frederic Sowa
2013-10-30 21:08 ` David Miller
2013-10-30 21:11   ` Hannes Frederic Sowa
2013-10-31  4:22     ` David Miller
2013-10-31  6:02       ` Duan Jiong
2013-10-31  8:45         ` Hannes Frederic Sowa
2013-10-31 11:09           ` Duan Jiong
2013-10-31 11:57             ` Hannes Frederic Sowa
2013-11-01 22:08             ` 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).