Subject: [PATCH 1/1] fix return code from fib_rules_lookup()

From: Ani Sinha <[email-masked]>
Date: Fri, 21 Nov 2014 22:25:21 -0800

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 <[email-masked]>
---
 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