From 87b49c088eeae867055bf2e8d603e732992bc92b Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 26 Mar 2015 14:15:24 +0100 Subject: [PATCH] platform/test: clear host part of routes in fake platform Adding a route with host part non zero is rejected by kernel. But NMLinuxPlatform works around it -- so must fake platform. (cherry picked from commit cdd3e1c30277a4647d40714e8d46c0e983aae689) --- src/platform/nm-fake-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/nm-fake-platform.c b/src/platform/nm-fake-platform.c index 806d661f78..09e1d37cc7 100644 --- a/src/platform/nm-fake-platform.c +++ b/src/platform/nm-fake-platform.c @@ -1152,7 +1152,7 @@ ip4_route_add (NMPlatform *platform, int ifindex, NMIPConfigSource source, route.source = NM_IP_CONFIG_SOURCE_KERNEL; route.ifindex = ifindex; route.source = source; - route.network = network; + route.network = nm_utils_ip4_address_clear_host_address (network, plen); route.plen = plen; route.gateway = gateway; route.metric = metric; @@ -1217,7 +1217,7 @@ ip6_route_add (NMPlatform *platform, int ifindex, NMIPConfigSource source, route.source = NM_IP_CONFIG_SOURCE_KERNEL; route.ifindex = ifindex; route.source = source; - route.network = network; + nm_utils_ip6_address_clear_host_address (&route.network, &network, plen); route.plen = plen; route.gateway = gateway; route.metric = metric;