Before IPv6 routing cache entries were always displayed
if additional tables beside MAIN and LOCAL are installed.
Signed-off-by: Ulrich Weber <uweber@astaro.com>
if (r->rtm_family == AF_INET6 && table != RT_TABLE_MAIN)
ip6_multiple_tables = 1;
+ if (filter.cloned == !(r->rtm_flags&RTM_F_CLONED))
+ return 0;
+
if (r->rtm_family == AF_INET6 && !ip6_multiple_tables) {
- if (filter.cloned) {
- if (!(r->rtm_flags&RTM_F_CLONED))
- return 0;
- }
if (filter.tb) {
- if (!filter.cloned && r->rtm_flags&RTM_F_CLONED)
- return 0;
if (filter.tb == RT_TABLE_LOCAL) {
if (r->rtm_type != RTN_LOCAL)
return 0;
}
}
} else {
- if (filter.cloned) {
- if (!(r->rtm_flags&RTM_F_CLONED))
- return 0;
- }
if (filter.tb > 0 && filter.tb != table)
return 0;
}