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 cdd3e1c302)
This commit is contained in:
Thomas Haller 2015-03-26 14:15:24 +01:00
parent 1bbf159cd0
commit 87b49c088e

View file

@ -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;