system: fix treatment of RT_TABLE_MAIN
authorSteven Barth <steven@midlink.org>
Fri, 20 Jun 2014 17:48:32 +0000 (19:48 +0200)
committerSteven Barth <steven@midlink.org>
Fri, 20 Jun 2014 17:48:32 +0000 (19:48 +0200)
commit07e9b542017c692ee2abe7a8689517b466150944
tree5de40d767a9bdf30d0a2bf6ad2235f01dc37dbdb
parent65cab45660dd0b234b663a39a133c64271f667b7
system: fix treatment of RT_TABLE_MAIN

Do not treat RT_TABLE_MAIN as RT_TABLE_UNSPEC in system_resolve_rt_table() in
order to allow ip rules with lookup main to work as expected.

Provide a new function system_is_default_rt_table() to allow calling code to
specifically test for RT_TABLE_MAIN, this is going to be needed for the
backwards compatible handling of the table attribute in route objects.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
system-dummy.c
system-linux.c
system.h