summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-12-22 18:01:12 +0100
committerThomas Haller <thaller@redhat.com>2015-01-11 13:08:34 +0100
commit2cb3c7e8a0164219dcbdc06a4fe073527bb23b7b (patch)
treeeb5aff6c747e4095245e1636e935a62e33618c8d
parent06e4eee0ce782460274ffab3c83bb8369f73d834 (diff)
downloadNetworkManager-2cb3c7e8a0164219dcbdc06a4fe073527bb23b7b.tar.gz
platform: route_search_cache() should not treat a metric 0 as "any" route
This match-any behavior ignoring metric is nowhere used. And even if we would need such a behavior, using 0 is wrong because IPv4 routes can have a metric of zero.
-rw-r--r--src/platform/nm-linux-platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 0cf743b453..d59b55bc1f 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -3865,7 +3865,7 @@ route_search_cache (struct nl_cache *cache, int family, int ifindex, const void
if (!_route_match (rtnlroute, family, ifindex, FALSE))
continue;
- if (metric && metric != rtnl_route_get_priority (rtnlroute))
+ if (metric != rtnl_route_get_priority (rtnlroute))
continue;
dst = rtnl_route_get_dst (rtnlroute);