summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-12-18 14:03:38 +0100
committerThomas Haller <thaller@redhat.com>2017-01-09 14:50:33 +0100
commit21ae09c1cc2d1f7fa61f352ae5d5c43b0b02e384 (patch)
tree099d30a851f2ab326b0920160fb8961b295f225f /src/tests
parent46d53e11012c047e09d04f663c1c36e6c47dc298 (diff)
downloadNetworkManager-21ae09c1cc2d1f7fa61f352ae5d5c43b0b02e384.tar.gz
core: add assertions for network_id/stable_type
We require a network-id. Assert that it is set. Also, we encode the stable-id as uint8. Thus, add an assertion that we don't use more then 254 IDs. If we ever make use of stable-type 255, we must extend the encoding to allow for more values. The assertion is there to catch that.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test-utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/test-utils.c b/src/tests/test-utils.c
index cd05a36d9f..16eb3aeccf 100644
--- a/src/tests/test-utils.c
+++ b/src/tests/test-utils.c
@@ -37,12 +37,12 @@ test_stable_privacy (void)
/* We get an address without the UUID. */
inet_pton (AF_INET6, "1::", &addr1);
- nm_utils_ipv6_addr_set_stable_privacy_impl (NM_UTILS_STABLE_TYPE_UUID, &addr1, "eth666", NULL, 384, (guint8 *) "key", 3, NULL);
+ nm_utils_ipv6_addr_set_stable_privacy_impl (NM_UTILS_STABLE_TYPE_UUID, &addr1, "eth666", "", 384, (guint8 *) "key", 3, NULL);
nmtst_assert_ip6_address (&addr1, "1::11aa:2530:9144:dafa");
/* We get a different address in a different network. */
inet_pton (AF_INET6, "2::", &addr1);
- nm_utils_ipv6_addr_set_stable_privacy_impl (NM_UTILS_STABLE_TYPE_UUID, &addr1, "eth666", NULL, 384, (guint8 *) "key", 3, NULL);
+ nm_utils_ipv6_addr_set_stable_privacy_impl (NM_UTILS_STABLE_TYPE_UUID, &addr1, "eth666", "", 384, (guint8 *) "key", 3, NULL);
nmtst_assert_ip6_address (&addr1, "2::338e:8d:c11:8726");
inet_pton (AF_INET6, "1234::", &addr1);