From: Steven Whitehouse Date: Fri, 30 Mar 2007 20:34:27 +0000 (-0700) Subject: [NET]: Change "not found" return value for rule lookup X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=83886b6b636173b206f475929e58fac75c6f2446;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [NET]: Change "not found" return value for rule lookup This changes the "not found" error return for the lookup function to -ESRCH so that it can be distinguished from the case where a rule or route resulting in -ENETUNREACH has been found during the search. It fixes a bug where if DECnet was compiled with routing support, but no routes were added to the routing table, it was failing to fall back to endnode routing. Signed-off-by: Steven Whitehouse Signed-off-by: Patrick Caulfield Signed-off-by: David S. Miller --- diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index d011819a8058..7174ced75efc 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -143,7 +143,7 @@ int fib_rules_lookup(struct fib_rules_ops *ops, struct flowi *fl, } } - err = -ENETUNREACH; + err = -ESRCH; out: rcu_read_unlock();