summaryrefslogtreecommitdiff
path: root/src/dhcp/tests/test-dhcp-utils.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-06-12 18:40:14 +0200
committerThomas Haller <thaller@redhat.com>2017-07-05 14:22:10 +0200
commit935411e5c03dcb62d5b2a85e67bf3220c75d0f5e (patch)
treea2736d05ab3424e576e250c65b44a6a16e4a861b /src/dhcp/tests/test-dhcp-utils.c
parent89385bd9683c521fbc85b5e452459c3d46d4528d (diff)
downloadNetworkManager-935411e5c03dcb62d5b2a85e67bf3220c75d0f5e.tar.gz
core: refactor NMIP4Config to use dedup-index for IPv4 routes
Eventually, every NMPlatformIP4Route, NMPlatformIP6Route, NMPlatformIP4Address and NMPlatformIP6Address should be shared an deduplicated via the global NMDedupMultiIndex instance. As first proof of concept, refactor NMIP4Config to track IPv4 routes via the shared multi_idx. There is later potential for improvement, when we pass (deduplicated) NMPObject instances around instead of plain NMPlatformIP4Route, which needs still a lot of comparing and cloning.
Diffstat (limited to 'src/dhcp/tests/test-dhcp-utils.c')
-rw-r--r--src/dhcp/tests/test-dhcp-utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dhcp/tests/test-dhcp-utils.c b/src/dhcp/tests/test-dhcp-utils.c
index 0d4e7f78e1..f3fa963e52 100644
--- a/src/dhcp/tests/test-dhcp-utils.c
+++ b/src/dhcp/tests/test-dhcp-utils.c
@@ -135,7 +135,7 @@ test_generic_options (void)
g_assert_cmpint (nm_ip4_config_get_num_routes (ip4_config), ==, 2);
/* Route #1 */
- route = nm_ip4_config_get_route (ip4_config, 0);
+ route = _nmtst_nm_ip4_config_get_route (ip4_config, 0);
g_assert (inet_pton (AF_INET, expected_route1_dest, &tmp) > 0);
g_assert (route->network == tmp);
g_assert (inet_pton (AF_INET, expected_route1_gw, &tmp) > 0);
@@ -144,7 +144,7 @@ test_generic_options (void)
g_assert_cmpint (route->metric, ==, 0);
/* Route #2 */
- route = nm_ip4_config_get_route (ip4_config, 1);
+ route = _nmtst_nm_ip4_config_get_route (ip4_config, 1);
g_assert (inet_pton (AF_INET, expected_route2_dest, &tmp) > 0);
g_assert (route->network == tmp);
g_assert (inet_pton (AF_INET, expected_route2_gw, &tmp) > 0);
@@ -221,7 +221,7 @@ ip4_test_route (NMIP4Config *ip4_config,
g_assert (expected_prefix <= 32);
- route = nm_ip4_config_get_route (ip4_config, route_num);
+ route = _nmtst_nm_ip4_config_get_route (ip4_config, route_num);
g_assert (inet_pton (AF_INET, expected_dest, &tmp) > 0);
g_assert (route->network == tmp);
g_assert (inet_pton (AF_INET, expected_gw, &tmp) > 0);