From: Mitsuru Chinen <mitch@linux.vnet.ibm.com>
To: Jarek Poplawski <jarkao2@gmail.com>
Cc: Jarek Poplawski <jarkao2@o2.pl>,
netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
Rami Rosen <roszenrami@gmail.com>
Subject: Re: [PATCH] [IPv4] Reply net unreachable ICMP message
Date: Fri, 7 Dec 2007 13:23:36 +0900 [thread overview]
Message-ID: <20071207132336.a503ec4e.mitch@linux.vnet.ibm.com> (raw)
In-Reply-To: <20071206084733.GB2164@ff.dom.local>
On Thu, 6 Dec 2007 09:47:33 +0100
Jarek Poplawski <jarkao2@o2.pl> wrote:
> On 06-12-2007 09:14, Mitsuru Chinen wrote:
> > On Thu, 6 Dec 2007 08:49:47 +0100
> > Jarek Poplawski <jarkao2@o2.pl> wrote:
> >
> >> On 06-12-2007 07:31, Mitsuru Chinen wrote:
> >>> IPv4 stack doesn't reply any ICMP destination unreachable message
> >>> with net unreachable code when IP detagrams are being discarded
> >>> because of no route could be found in the forwarding path.
> >>> Incidentally, IPv6 stack replies such ICMPv6 message in the similar
> >>> situation.
> ...
> >> This patch seems to be wrong. It overrides err codes from
> >> fib_lookup, where such decisions should be made.
> >
> > fib_lookup() replies -ESRCH in this situation.
> > It is necessary to override the variable by the suitable error
> > number like the code under e_hostunreach label.
>
> Probably I miss something, but I can't see how can you be sure it's
> only -ESRCH possible here? Isn't opt->action() in fib_rules_lookup()
> supposed to return this -ENETUNREACH when needed?
Oh, excuse me. I did mistake.
fib_rules_lookup() replies -ESRCH when no route is found. The case
it replies -ENETUNREACH is that user adds unreachable route.
However, if the err value is override with no check, a blackhole
or prohibit route is treated as a unreachable route.
As the patch is already applied, I will send another patch to add
a check for it.
Thank you very much for pointing out the issue!
Best Regards,
----
Mitsuru Chinen <mitch@linux.vnet.ibm.com>
prev parent reply other threads:[~2007-12-07 4:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 6:31 [PATCH] [IPv4] Reply net unreachable ICMP message Mitsuru Chinen
2007-12-06 6:33 ` David Miller
2007-12-06 7:49 ` Jarek Poplawski
2007-12-06 8:12 ` Rami Rosen
2007-12-06 8:14 ` Mitsuru Chinen
2007-12-06 8:47 ` Jarek Poplawski
2007-12-07 4:23 ` Mitsuru Chinen [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=20071207132336.a503ec4e.mitch@linux.vnet.ibm.com \
--to=mitch@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=jarkao2@gmail.com \
--cc=jarkao2@o2.pl \
--cc=netdev@vger.kernel.org \
--cc=roszenrami@gmail.com \
/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).