summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-10-20 16:43:41 +0200
committerThomas Haller <thaller@redhat.com>2014-11-05 23:54:19 +0100
commite962d9a8dd5f0e97b84c31e97e3f64f532d039cc (patch)
tree34f702842b1b1ed682cc6a8821a267f39f315077
parent060d9711c1ed4651f40314c6cbf3a43e650274ae (diff)
downloadNetworkManager-e962d9a8dd5f0e97b84c31e97e3f64f532d039cc.tar.gz
core: fix comparing metric for IPv6 routes
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--src/nm-ip6-config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c
index b6d6e6d5fe..1f27072716 100644
--- a/src/nm-ip6-config.c
+++ b/src/nm-ip6-config.c
@@ -168,7 +168,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