mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 23:21:22 +03:00
network: route: handle null address with non-zero prefixlen correctly
Previously, even if a link has a route to e.g. ::/96, default gateway via ::1.2.3.4 cannot be configured.
This commit is contained in:
parent
b489d6a26e
commit
cf477495d6
@ -116,7 +116,7 @@ static bool link_address_is_reachable(Link *link, int family, const union in_add
|
||||
continue;
|
||||
if (route->family != family)
|
||||
continue;
|
||||
if (!in_addr_is_set(route->family, &route->dst))
|
||||
if (!in_addr_is_set(route->family, &route->dst) && route->dst_prefixlen == 0)
|
||||
continue;
|
||||
if (in_addr_prefix_covers(family, &route->dst, route->dst_prefixlen, address) > 0)
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user