From: "Nikola Forró" <nforro@redhat.com>
To: Alexander Duyck <alexander.duyck@gmail.com>, netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>,
Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH] net: Fix behavior of unreachable, blackhole and prohibit routes
Date: Thu, 03 Sep 2015 11:05:14 +0200 [thread overview]
Message-ID: <1441271114.3360.34.camel@redhat.com> (raw)
In-Reply-To: <55E5E610.501@gmail.com>
Hello Alexander,
thank you for your comments.
On 09/01/2015 10:53 AM, Alexander Duyck wrote:
> Generally updating kernel code to match user-space documentation
> isn't
> always the best way to go. The question I would have is if there are
> any other user-space applications out there that might be expecting
> this
> behaviour now?
>
Well, any application which uses connect or sendto syscalls is getting
wrong error codes. If not wrong, than at least different for ipv4 and
ipv6. I think errors in fib_props are defined for a reason.
But I think bigger issue are incorrect ICMP messages being returned to
sender, e.g. packet going to blackhole route is not silently discarded,
instead it generates ICMP net unreachable message. I think that kind of
breaks the purpose of blackhole route.
> Also your changes don't seem to match up with what you have
> described.
> You are returning the error code from fib_table_lookup, but
> fib_table_lookup can return -EAGAIN if there is no matching entry
> found.
> I don't see you describing how you would deal with that case. You
> might try testing your code after deleting the default route to see
> what
> behaviour it is you get.
>
You are right, I need to handle -EAGAIN and return -ENETUNREACH
instead.
> This bit appears to overlook the fact that fib_rules_lookup could
> also
> be the function used to return the error via a call to fib_lookup.
> In
> which case that also throws -ESRCH into the mix for return error
> codes.
>
I don't think it does. In __fib_lookup -ESRCH returned from
fib_rules_lookup is being replaced by -ENETUNREACH.
I will submit corrected patch.
Kind regards,
Nikola
prev parent reply other threads:[~2015-09-03 9:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 10:13 [PATCH] net: Fix behavior of unreachable, blackhole and prohibit routes Nikola Forró
2015-09-01 17:53 ` Alexander Duyck
2015-09-03 9:05 ` Nikola Forró [this message]
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=1441271114.3360.34.camel@redhat.com \
--to=nforro@redhat.com \
--cc=alexander.duyck@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).