netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] fix return code from fib_rules_lookup()
@ 2014-11-22  6:25 Ani Sinha
  2014-11-23 19:24 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Ani Sinha @ 2014-11-22  6:25 UTC (permalink / raw)
  To: davem, maze, edumazet; +Cc: netdev, fruggeri, ani

 fib_lookup() api returns two different types of error
 codes. When no custom FIB rules are installed and
 lookup fails, it returns ENETUNREACH. However, when
 custom rules are installed, __fib_lookup() calls
 fib_rules_lookup() which returns ESRCH when the rule
 lookup fails. This patch makes both code paths return
 identical error codes under lookup failure.


Signed-off-by: Ani Sinha <ani@arista.com>
---
 net/core/fib_rules.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 185c341..ab8e732 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -242,7 +242,7 @@ jumped:
 		}
 	}
 
-	err = -ESRCH;
+	err = -ENETUNREACH;
 out:
 	rcu_read_unlock();
 
-- 
1.7.4.4

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

end of thread, other threads:[~2014-11-24 18:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-22  6:25 [PATCH 1/1] fix return code from fib_rules_lookup() Ani Sinha
2014-11-23 19:24 ` David Miller
2014-11-24 18:34   ` Ani Sinha

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).