summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-09-02 16:45:48 +0200
committerThomas Haller <thaller@redhat.com>2017-09-02 16:50:24 +0200
commit7b64334042d278400973bebf78c664503e775963 (patch)
tree9d259660b276a1e61a0ca1f5419f37e02bde2f8b
parent6a740fa247fefc8cc5c0b50458108e654db91dc5 (diff)
downloadNetworkManager-7b64334042d278400973bebf78c664503e775963.tar.gz
platform: fix deleting routes in nm_platform_ip_route_sync()
The condition was wrong resulting in sync() not deleting route when it should. Fixes: f0de7d347f3663c6706b05d462adb2f144f78ab3
-rw-r--r--src/platform/nm-platform.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c
index ba2cf7a76b..9a350861a6 100644
--- a/src/platform/nm-platform.c
+++ b/src/platform/nm-platform.c
@@ -3620,9 +3620,9 @@ nm_platform_ip_route_sync (NMPlatform *self,
continue;
}
- conf_o = routes_idx ? g_hash_table_lookup (routes_idx, plat_o) : NULL;
- if ( !conf_o
- || vt->route_cmp (NMP_OBJECT_CAST_IPX_ROUTE (conf_o),
+ if ( routes_idx
+ && (conf_o = g_hash_table_lookup (routes_idx, plat_o))
+ && vt->route_cmp (NMP_OBJECT_CAST_IPX_ROUTE (conf_o),
NMP_OBJECT_CAST_IPX_ROUTE (plat_o),
NM_PLATFORM_IP_ROUTE_CMP_TYPE_SEMANTICALLY) == 0) {
/* the route in platform is identical to the one we want to add.