Such routes seem to show up in tables other than local with recent kernels.
Fixes #2555.
/**
* Check if the route received with RTM_NEWROUTE is usable based on its type.
*/
-static bool route_usable(struct nlmsghdr *hdr)
+static bool route_usable(struct nlmsghdr *hdr, bool allow_local)
{
struct rtmsg *msg;
case RTN_PROHIBIT:
case RTN_THROW:
return FALSE;
+ case RTN_LOCAL:
+ return allow_local;
default:
return TRUE;
}
rt_entry_t *other;
uintptr_t table;
- if (!route_usable(current))
+ if (!route_usable(current, TRUE))
{
continue;
}
{
rt_entry_t route;
- if (!route_usable(this->current))
+ if (!route_usable(this->current, FALSE))
{
break;
}