Use system_is_default_rt_table() to test whether the resolved routing table
is the default one, in this case do not apply the table attribute to the
route object.
This is needed for backwards compatibility - only routes using a non-default
table shall report it in the ifstatus output.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
goto error;
}
+ /* only set the table flag if not using the main (default) table */
+ if (system_is_default_rt_table(route->table))
+ route->table = 0;
+
if (route->table)
route->flags |= DEVROUTE_TABLE;
}