From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Zang MingJie <zealot0630@gmail.com>, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [BUG] net/ipv4: inconsistent routing table
Date: Mon, 10 Aug 2015 11:16:59 +0200 [thread overview]
Message-ID: <878u9jijuc.fsf@stressinduktion.org> (raw)
In-Reply-To: <CAOrge3q16PRh3TEBaGUeYDhLzWhCCytn+sopTzBr_23cj1gmaw@mail.gmail.com>
Hello,
Zang MingJie <zealot0630@gmail.com> writes:
> Days ago I mistakenly set the gateway address on my box, then add the
> default router, after I deleted the address my box can't access
> Internet and all things looks fine. It takes me several hours to
> figure out it is an kernel bug.
I don't consider this a kernel bug.
>>On Sat, Aug 8, 2015, 1:00 AM Hannes Frederic Sowa <hannes@stressinduktion.org> wrote:
>>If we could rewind time, we could make local nexthops -EINVAL.
>
> I don't think this is the proper solution. As almost all network OS
> considers the routing table recursive, and it's next hop can be any
> unicast ip address.
You are talking about ios, junos, no?
Linux does not have any kind of recursive routing table. It only helps
by doing a first-hop lookup during insertion time, that's merely it. If
you want to compare Linux to a "network OS" you would have to install
quagga/bird/xorp/... on a box to get the same behavior.
Also notice that we don't talk about adding/removing addresses to
interfaces but what the routing code considers are the routes which get
created because of those address changes (like the subnet route added in
IPv4 if you install an address with subnet on an interface). Thus we
shouldn't make address changes special, we would have to reevaluate the
complete FIB/routing-table (I guess everyone is talking about something
different here) at the time we only change a route. And this is a no-go.
I don't see a problem with adding a "recursive routing table" to the
stack if people need that. I just don't see the need for that.
> When the next hop is unreachable the entry won't be installed.
In a recursive routing table, the entry could be installed but it will
only get into effect when the nexthop turns reachable.
> I suggest adding a new sysconf entry, when not set, behavior as the
> same as now, when set recalculate the fib when necessary
A new sysctl would work, but I don't consider it necessary. I don't
think we need the additional code for that. Kernel does not run routing
protocols and those are normally the only ones which need to do that.
> BTW is there any way to check the fib table?
I don't understand the question. Do you mean
ip route get xx.yy.zz.aa ?
Bye,
Hannes
next prev parent reply other threads:[~2015-08-10 9:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAOrge3qi=7YPRO+VeCDvHsm_7SFC4Y=+JpwQtwAV3zk_q4fEAw@mail.gmail.com>
2015-08-05 9:06 ` [BUG] net/ipv4: inconsistent routing table Daniel Borkmann
2015-08-05 17:45 ` Alexander Duyck
2015-08-06 10:13 ` Zang MingJie
2015-08-06 19:43 ` Alexander Duyck
2015-08-07 8:23 ` Zang MingJie
2015-08-07 16:08 ` Alexander Duyck
2015-08-07 17:00 ` Hannes Frederic Sowa
[not found] ` <CAOrge3qxOb_XrspuvYjV0pDDxUUoqGE3690KUQGoxZMxuD-NRQ@mail.gmail.com>
2015-08-08 10:36 ` Zang MingJie
2015-08-10 9:16 ` Hannes Frederic Sowa [this message]
2015-08-10 10:51 ` Zang MingJie
2015-08-10 11:50 ` Hannes Frederic Sowa
2015-08-11 20:52 ` Alexander Duyck
2015-08-11 21:15 ` David Miller
2015-08-12 8:14 ` Zang MingJie
2015-08-12 15:23 ` Stephen Hemminger
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=878u9jijuc.fsf@stressinduktion.org \
--to=hannes@stressinduktion.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=zealot0630@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).