kernel-netlink: Fix lookup of next hops for destinations with prefix
References #1347.
This commit is contained in:
@@ -1710,9 +1710,10 @@ static host_t *get_route(private_kernel_netlink_net_t *this, host_t *dest,
|
|||||||
chunk = candidate->get_address(candidate);
|
chunk = candidate->get_address(candidate);
|
||||||
netlink_add_attribute(hdr, RTA_PREFSRC, chunk, sizeof(request));
|
netlink_add_attribute(hdr, RTA_PREFSRC, chunk, sizeof(request));
|
||||||
}
|
}
|
||||||
|
/* we use this below to match against the routes */
|
||||||
|
chunk = dest->get_address(dest);
|
||||||
if (!match_net)
|
if (!match_net)
|
||||||
{
|
{
|
||||||
chunk = dest->get_address(dest);
|
|
||||||
netlink_add_attribute(hdr, RTA_DST, chunk, sizeof(request));
|
netlink_add_attribute(hdr, RTA_DST, chunk, sizeof(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user