From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: Stas Sergeev <stsp@list.ru>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: Q: bad routing table cache entries
Date: Tue, 29 Dec 2015 07:32:29 -0500 [thread overview]
Message-ID: <20151229123229.GA22743@oracle.com> (raw)
In-Reply-To: <56827759.8020605@list.ru>
On (12/29/15 15:06), Stas Sergeev wrote:
> Router on 192.168.8.1 is just a PC with ubuntu, w/o any special
> software. I'd be very surprised if it does so. As I understand,
> linux would accept such ICMP redirect only from the router, or
> could someone else also send them?
If someone elase can spoof redirects on your network, you have
a much bigger network management problem- at that point, how can you
trust anything, e.g., a default rdisc rtradv?
> But what worries me more, is the question:
> Should the linux kernel really silently accept those, breaking
> the routing in a completely unexpected ways? Isn't it a bug?
How is the receiver supposed to know that the redirect was "bad"?
In your example, you claimed that
a "good" redirect was:
ip route get 91.189.89.237
91.189.89.237 via 192.168.8.1 dev eth0 src 192.168.10.202
cache
but a "bad" one was:
ip route get 91.189.89.238
91.189.89.238 via 192.168.0.1 dev eth0 src 192.168.10.202
cache <redirected>
Its not clear to me what the netmask on eth0 is - is this a /16
(in which case both redirs are "good" as far as the receiver can tell)?
Are the 2 gws also on a /16? or something longer?
> The sanity check against netmask looks trivial, so why it is not there?
According to rfc1812 (pg 82-84)
Routers MUST NOT generate a Redirect Message unless all the following
conditions are met:
o The packet is being forwarded out the same physical interface that
it was received from,
o The IP source address in the packet is on the same Logical IP
(sub)network as the next-hop IP address, and
o The packet does not contain an IP source route option.
The second condition seems to have been violated by the router. I
suppose it might not hurt if the receiver can do some sanity checking
on the redirect but this might not eliminate every error, since
it might not be possible to detect netmask mismatch in every case.
--Sowmini
next prev parent reply other threads:[~2015-12-29 12:32 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-29 10:54 Q: bad routing table cache entries Stas Sergeev
2015-12-29 11:58 ` Sowmini Varadhan
2015-12-29 12:06 ` Stas Sergeev
2015-12-29 12:32 ` Sowmini Varadhan [this message]
2015-12-29 12:43 ` Stas Sergeev
2015-12-29 13:19 ` Stas Sergeev
2015-12-29 15:22 ` Sowmini Varadhan
2015-12-29 15:38 ` Stas Sergeev
2015-12-29 17:40 ` Stas Sergeev
2015-12-30 12:42 ` Stas Sergeev
2015-12-30 14:17 ` Eric Dumazet
2015-12-30 17:56 ` David Miller
2016-01-04 1:05 ` Sowmini Varadhan
2016-01-04 1:32 ` Stas Sergeev
2016-01-04 17:23 ` Stas Sergeev
2016-01-12 14:40 ` Stas Sergeev
2016-01-12 14:47 ` Sowmini Varadhan
2016-01-12 20:33 ` David Miller
2016-01-12 15:34 ` Hannes Frederic Sowa
2016-01-12 15:52 ` Hannes Frederic Sowa
2016-01-12 16:03 ` Stas Sergeev
2016-01-12 16:10 ` Hannes Frederic Sowa
2016-01-12 16:42 ` Stas Sergeev
2016-01-12 16:56 ` Stas Sergeev
2016-01-12 17:06 ` Hannes Frederic Sowa
2016-01-12 17:18 ` Stas Sergeev
2016-01-12 17:26 ` Hannes Frederic Sowa
2016-01-12 17:33 ` Stas Sergeev
2016-01-12 17:47 ` Hannes Frederic Sowa
2016-01-12 20:43 ` Stas Sergeev
2016-01-12 22:26 ` Hannes Frederic Sowa
2016-01-12 22:57 ` Stas Sergeev
2016-01-12 23:07 ` Hannes Frederic Sowa
2016-01-13 12:59 ` Stas Sergeev
2016-01-12 17:41 ` Stas Sergeev
2016-01-12 15:57 ` Stas Sergeev
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=20151229123229.GA22743@oracle.com \
--to=sowmini.varadhan@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=stsp@list.ru \
/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).