diff options
author | Krzysztof Piotr Oledzki <ole@ans.pl> | 2008-06-10 18:44:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-10 18:44:49 -0400 |
commit | 709772e6e06564ed94ba740de70185ac3d792773 (patch) | |
tree | 17f94a2db1a8b47595a9440de0f7f375fae59134 /include/linux | |
parent | 99c6f60e72f112b57ddb07abb2e5f771ee211f43 (diff) |
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=252 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.
Signed-off-by: Krzysztof Piotr Oledzki <ole@ans.pl>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/rtnetlink.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index a2aec2c0cfb5..b358c704d102 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -246,6 +246,7 @@ enum rt_class_t | |||
246 | { | 246 | { |
247 | RT_TABLE_UNSPEC=0, | 247 | RT_TABLE_UNSPEC=0, |
248 | /* User defined values */ | 248 | /* User defined values */ |
249 | RT_TABLE_COMPAT=252, | ||
249 | RT_TABLE_DEFAULT=253, | 250 | RT_TABLE_DEFAULT=253, |
250 | RT_TABLE_MAIN=254, | 251 | RT_TABLE_MAIN=254, |
251 | RT_TABLE_LOCAL=255, | 252 | RT_TABLE_LOCAL=255, |