diff options
author | Thomas Haller <thaller@redhat.com> | 2014-10-20 16:43:41 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-10-29 17:33:13 +0100 |
commit | 470f0ab225b81eeb6b535230c1367a0d61ac5bff (patch) | |
tree | bb36d131047a57ffdfd499f8ae0067867e6c792b | |
parent | 21d9c7a2e01490e676e81749c1e9c7dd9bc0ccda (diff) | |
download | NetworkManager-470f0ab225b81eeb6b535230c1367a0d61ac5bff.tar.gz |
core: fix comparing metric for IPv6 routes
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | src/nm-ip6-config.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c index 470fc22fa3..4d04c502e0 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 |