[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA7UhcmMYa+N4VUFjfM_qjCdhy3zAE0C8eN+Z0nsACNZeJ4RKA@mail.gmail.com>
Date: Tue, 13 Mar 2012 11:26:36 -0300
From: Diego Woitasen <diego@...tasen.com.ar>
To: David Miller <davem@...emloft.net>
Cc: billfink@...dspring.com, shemminger@...tta.com,
netdev@...r.kernel.org
Subject: Re: ip route show shows the routes in the inverse order?
On Tue, Mar 13, 2012 at 3:52 AM, David Miller <davem@...emloft.net> wrote:
> From: Bill Fink <billfink@...dspring.com>
> Date: Tue, 13 Mar 2012 02:15:29 -0400
>
>> Some scripts may depend on this plus its much more efficent that way
>> if trying to find a matching route since you can quit on the first
>> match instead of having to scan the entire routing table.
>
> No script should be doing stuff like this, let the tool do it for you
> via "ip route get ADDR"
>
> There is absolutely no argument for routes to be listed in one order
> or another, and anything depending upon order is extremely fragile
> and needs to be fixed up anyways.
I don't aggree at this point. First, it was the behavior for years,
like a "de facto" standard. Second, there a "natural ordering" for
routes. More specific match first, so it makes sense for them to be in
the first place.
>
> If you're trying to match something, do a real lookup, a longest
> prefix match lookup. It's the only thing that's going to be correct
> all the time, no matter what.
--
Diego Woitasen
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists