Check routes with equal prefix if preferred source is specified
This commit is contained in:
@@ -1236,8 +1236,10 @@ static host_t *get_route(private_kernel_netlink_net_t *this, host_t *dest,
|
|||||||
}
|
}
|
||||||
rta = RTA_NEXT(rta, rtasize);
|
rta = RTA_NEXT(rta, rtasize);
|
||||||
}
|
}
|
||||||
if (msg->rtm_dst_len <= best)
|
if (msg->rtm_dst_len < best ||
|
||||||
{ /* not better than a previous one */
|
msg->rtm_dst_len == best && (nexthop || !candidate))
|
||||||
|
{ /* not better than a previous one, but if a preferred source
|
||||||
|
* address is specified, we still check equal routes */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
enumerator = this->rt_exclude->create_enumerator(this->rt_exclude);
|
enumerator = this->rt_exclude->create_enumerator(this->rt_exclude);
|
||||||
|
|||||||
Reference in New Issue
Block a user