public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ani Sinha <ani@arista•com>
To: davem@davemloft•net, maze@google•com, edumazet@google•com
Cc: netdev@vger•kernel.org, fruggeri@arista•com, ani@arista•com
Subject: [PATCH 1/1] fix return code from fib_rules_lookup()
Date: Fri, 21 Nov 2014 22:25:21 -0800	[thread overview]
Message-ID: <1416637521-20173-1-git-send-email-ani@arista.com> (raw)

 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

             reply	other threads:[~2014-11-22  6:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-22  6:25 Ani Sinha [this message]
2014-11-23 19:24 ` [PATCH 1/1] fix return code from fib_rules_lookup() David Miller
2014-11-24 18:34   ` Ani Sinha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1416637521-20173-1-git-send-email-ani@arista.com \
    --to=ani@arista$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=fruggeri@arista$(echo .)com \
    --cc=maze@google$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox