From 47167cab4f4c09861874fcb894afc8770437a292 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 25 Jan 2015 18:35:42 +0100 Subject: [PATCH] platform: fix route addition ordering --- src/platform/nm-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 7d342e50bb..6237b28994 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -2142,7 +2142,7 @@ nm_platform_ip4_route_sync (int ifindex, const GArray *known_routes) if (NM_PLATFORM_IP_ROUTE_IS_DEFAULT (known_route)) continue; - if ((known_route->gateway == 0) ^ (i_type != 0)) { + if ((known_route->gateway == 0) ^ (i_type == 0)) { /* Make two runs over the list of routes. On the first, only add * device routes, on the second the others (gateway routes). */ continue; @@ -2216,7 +2216,7 @@ nm_platform_ip6_route_sync (int ifindex, const GArray *known_routes) if (NM_PLATFORM_IP_ROUTE_IS_DEFAULT (known_route)) continue; - if (IN6_IS_ADDR_UNSPECIFIED (&known_route->gateway) ^ (i_type != 0)) { + if (IN6_IS_ADDR_UNSPECIFIED (&known_route->gateway) ^ (i_type == 0)) { /* Make two runs over the list of routes. On the first, only add * device routes, on the second the others (gateway routes). */ continue;