summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-08-02 10:27:32 +0200
committerThomas Haller <thaller@redhat.com>2017-08-03 18:51:57 +0200
commitd373855e9820e3646c652c8530ef14d7cc25f758 (patch)
treeeb744d080218403e574ca1b827aa58a79681da32 /src/tests
parent75dc0fdd27ff7c96429f27ffd8d9ea4c361d7c26 (diff)
downloadNetworkManager-d373855e9820e3646c652c8530ef14d7cc25f758.tar.gz
platform: extend API for adding routes
Via the flags of the RTM_NEWROUTE netlink message, kernel and iproute2 support various variants to add a route. - ip route add - ip route change - ip route replace - ip route prepend - ip route append - ip route test Previously, our nm_platform_ip4_route_add() function was basically `ip route replace`. In the future, we should rather user `ip route append` instead. Anyway, expose the netlink message flags in the API. This allows to use the various forms, and makes it also more apparent to the user that they even exist.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test-route-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/test-route-manager.c b/src/tests/test-route-manager.c
index e6b72ac87e..e7d0321a1e 100644
--- a/src/tests/test-route-manager.c
+++ b/src/tests/test-route-manager.c
@@ -857,7 +857,7 @@ test_ip4_full_sync (test_fixture *fixture, gconstpointer user_data)
_assert_route_check (vtable, TRUE, (const NMPlatformIPXRoute *) &r02);
_assert_route_check (vtable, FALSE, (const NMPlatformIPXRoute *) &r03);
- vtable->route_add (NM_PLATFORM_GET, 0, (const NMPlatformIPXRoute *) &r03, -1);
+ vtable->route_add (NM_PLATFORM_GET, NMP_NLM_FLAG_REPLACE, (const NMPlatformIPXRoute *) &r03, 0, -1);
_assert_route_check (vtable, TRUE, (const NMPlatformIPXRoute *) &r01);
_assert_route_check (vtable, TRUE, (const NMPlatformIPXRoute *) &r02);