diff options
author | Thomas Haller <thaller@redhat.com> | 2014-12-22 18:01:12 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-01-07 23:33:37 +0100 |
commit | 8825f043523b06213ed74d5896ea5d8d338bf096 (patch) | |
tree | 3e3cf66f3f6d73618329c4803a9a0bc6828db592 | |
parent | 107c683563eb0d4d983eb37d778542f357f6dc07 (diff) | |
download | NetworkManager-8825f043523b06213ed74d5896ea5d8d338bf096.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.c | 2 |
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); |