From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: on-link assumption in ipv4 routing cache
Date: Thu, 23 Oct 2008 13:47:44 -0400 [thread overview]
Message-ID: <4900B8C0.5020205@hp.com> (raw)
In-Reply-To: <20081020.221312.211946478.davem@davemloft.net>
David Miller wrote:
> From: Vlad Yasevich <vladislav.yasevich@hp.com>
> Date: Mon, 20 Oct 2008 21:02:44 -0400
>
>> This was somewhat of a surprise since I expected a EHOSTUNRACH error since
>> there were no routes to the destination and SO_DONTROUTE was not set.
>>
>> I am really curious as to reason for this behavior?
>
> In general the Linux ipv4 stack tries to do things that make it more
> likely for successful communication between two nodes.
>
> This is one such example, another is the choice of using the host
> based addressing model rather than the interface based addressing
> model.
>
> Alexey Kuznetsov is responsible for most of these decisions, he is
> a genius.
>
Hi David
Ok, I've found the code and the explanation, but I think there is
a small bug here that's been around a very long time. There is absolutely
no checking for the interface state. This means that if the interface
is brought down, we are still going to attempt to route through it.
That seems broken, since the interface was administratively brought down.
I've actually tried to do this with my test app. I've set it to connect
over a given interface, brought the interface down, and then issued the
connect(). The result is that the app hung until tcp_syn_retries SYNs have
been issued and then returned error.
I've got no issues against on-link assumption as long as there are some smarts
behind it. The least we could do is use a running interface.
-vlad
next prev parent reply other threads:[~2008-10-23 17:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 1:02 on-link assumption in ipv4 routing cache Vlad Yasevich
2008-10-21 5:13 ` David Miller
2008-10-23 17:47 ` Vlad Yasevich [this message]
2008-11-04 1:32 ` David Miller
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=4900B8C0.5020205@hp.com \
--to=vladislav.yasevich@hp.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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).