From: Jarek Poplawski <jarkao2@gmail.com>
To: Krzysztof Oledzki <olel@ans.pl>
Cc: kaber@trash.net, netdev@vger.kernel.org
Subject: Re: [PATCH] Fix routing tables with id > 255 for legacy software
Date: Tue, 3 Jun 2008 11:33:43 +0000 [thread overview]
Message-ID: <20080603113343.GA4714@ff.dom.local> (raw)
In-Reply-To: <Pine.LNX.4.64.0806031220490.3438@bizon.gios.gov.pl>
On Tue, Jun 03, 2008 at 12:37:35PM +0200, Krzysztof Oledzki wrote:
>
>
> On Tue, 3 Jun 2008, Jarek Poplawski wrote:
>
>> On 03-06-2008 00:09, Krzysztof Oledzki wrote:
>>> From 4cb8c341fc444afc638cf9ce4efb7e4248e88b5e Mon Sep 17 00:00:00 2001
>>> From: Krzysztof Piotr Oledzki <ole@ans.pl>
>>> Date: Tue, 3 Jun 2008 00:03:41 +0200
>>> Subject: [NET] Fix routing tables with id > 255 for legacy software
>>>
>>> Most legacy software do not like tables > 255 as rtm_table is u8
>>> so tb_id is sent &0xff and it is possible to mismatch for example
>>> table 510 with table 254 (main).
>>>
>>> This patch introduces RT_TABLE_COMPAT=253 so the code uses it if
>>> tb_id > 255. It makes such old applications happy, new
>>> ones are still able to use RTA_TABLE to get a proper table id.
>>>
>>
>> Probably, as usual, some people will grumble this breaks their scripts,
>> so, probably, some if or ifdef is needed?
> Why? If scripts are based on a recent version of iproute2 that uses
> RTA_TABLE then everything should work, especially there is no way to use
> tables with id > 255 with old iproute2.
If such an old app uses rtm_table, this 253 table could be used for
something and get additional entries after this patch. Another case
would be when such an overflow on 0xff is "expected", then old tables
would loose their entries. I hope I'm wrong with this, but it looks
like admins can do strange things, and then this would be called a
regression. So, I think this patch is right if we are sure there are
no such cases...
>
>> BTW, I wonder, how these old appliction would treat RT_TABLE_UNSPEC
>> instead.
>
> Such old appliction is for example zebra/quagga: it asks for all routes,
> does not know about RTA_TABLE so uses rtm_table and selects all entries
> with rtm_table == RT_TABLE_MAIN or zebrad.rtm_table_default which is
> unfortunately 0 by default. So no, RT_TABLE_UNSPEC (0) does not help,
> even makes everythink worse here.
I see: so we don't care for these RT_TABLE_COMPAT entries, let only
they don't go to _MAIN or _UNSPEC!
Thanks for the explanation,
Jarek P.
next prev parent reply other threads:[~2008-06-03 11:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-02 22:09 [PATCH] Fix routing tables with id > 255 for legacy software Krzysztof Oledzki
2008-06-03 8:08 ` Jarek Poplawski
2008-06-03 10:37 ` Krzysztof Oledzki
2008-06-03 11:33 ` Jarek Poplawski [this message]
2008-06-03 11:47 ` Jarek Poplawski
2008-06-03 12:43 ` Patrick McHardy
2008-06-03 13:03 ` Krzysztof Oledzki
2008-06-03 13:10 ` Patrick McHardy
2008-06-03 15:15 ` Krzysztof Oledzki
2008-06-03 17:49 ` Jarek Poplawski
2008-06-03 17:58 ` Patrick McHardy
2008-06-03 18:29 ` Jarek Poplawski
2008-06-03 18:29 ` Krzysztof Oledzki
2008-06-03 18:42 ` Jarek Poplawski
2008-06-03 18:28 ` Patrick McHardy
2008-06-03 18:39 ` Krzysztof Oledzki
2008-06-03 20:28 ` Patrick McHardy
2008-06-03 23:23 ` Patrick McHardy
2008-06-10 22:45 ` 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=20080603113343.GA4714@ff.dom.local \
--to=jarkao2@gmail.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=olel@ans.pl \
/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).