mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-02 17:48:07 +02:00
core: fix comparing metric for IPv6 routes
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
df923622b1
commit
3c17254823
1 changed files with 3 additions and 1 deletions
|
|
@ -171,7 +171,9 @@ static gboolean
|
|||
routes_are_duplicate (const NMPlatformIP6Route *a, const NMPlatformIP6Route *b, gboolean consider_gateway_and_metric)
|
||||
{
|
||||
return IN6_ARE_ADDR_EQUAL (&a->network, &b->network) && a->plen == b->plen &&
|
||||
(!consider_gateway_and_metric || (IN6_ARE_ADDR_EQUAL (&a->gateway, &b->gateway) && a->metric == b->metric));
|
||||
( !consider_gateway_and_metric
|
||||
|| ( IN6_ARE_ADDR_EQUAL (&a->gateway, &b->gateway)
|
||||
&& nm_utils_ip6_route_metric_normalize (a->metric) == nm_utils_ip6_route_metric_normalize (b->metric)));
|
||||
}
|
||||
|
||||
static gint
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue