mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 00:30:09 +01:00
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:
parent
1bbf159cd0
commit
87b49c088e
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue