summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-03-26 14:15:24 +0100
committerThomas Haller <thaller@redhat.com>2015-04-08 14:39:16 +0200
commitcdd3e1c30277a4647d40714e8d46c0e983aae689 (patch)
tree5504c0702f20382657fd156b58467f825e807cf3
parent21b129084fb3ac026a17cbde4e1743f0990b8658 (diff)
downloadNetworkManager-cdd3e1c30277a4647d40714e8d46c0e983aae689.tar.gz
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.
-rw-r--r--src/platform/nm-fake-platform.c4
1 files 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;