diff options
| author | Michael Biebl <biebl@debian.org> | 2018-07-01 20:59:09 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-07-01 20:59:09 +0200 |
| commit | 6106f75cc14c2d8af6999bd28dd075c32411deaf (patch) | |
| tree | 2e084cc81011fc5cec703704f2ff5b65f5a7fa8d /src/platform | |
| parent | e8b3308b1970e9b71b443479351e173cb89e3800 (diff) | |
| parent | 429393567647935d9123e21fd27a7529d50255eb (diff) | |
Update upstream source from tag 'upstream/1.12.0'
Update to upstream version '1.12.0' with Debian dir 76506925b30952acfa95c8f5b789bcfb2a8e3a6e
Diffstat (limited to 'src/platform')
| -rw-r--r-- | src/platform/nm-fake-platform.c | 2 | ||||
| -rw-r--r-- | src/platform/tests/test-cleanup.c | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/platform/nm-fake-platform.c b/src/platform/nm-fake-platform.c index 06dd7e13..f8f4627e 100644 --- a/src/platform/nm-fake-platform.c +++ b/src/platform/nm-fake-platform.c @@ -482,7 +482,7 @@ link_changed (NMPlatform *platform, if (!IN6_IS_ADDR_UNSPECIFIED (&device->ip6_lladdr)) { if (device->obj->link.connected) - ip6_address_add (platform, device->obj->link.ifindex, in6addr_any, 64, device->ip6_lladdr, NM_PLATFORM_LIFETIME_PERMANENT, NM_PLATFORM_LIFETIME_PERMANENT, 0); + ip6_address_add (platform, device->obj->link.ifindex, device->ip6_lladdr, 64, in6addr_any, NM_PLATFORM_LIFETIME_PERMANENT, NM_PLATFORM_LIFETIME_PERMANENT, 0); else ip6_address_delete (platform, device->obj->link.ifindex, device->ip6_lladdr, 64); } diff --git a/src/platform/tests/test-cleanup.c b/src/platform/tests/test-cleanup.c index a213b31f..8b8c87d8 100644 --- a/src/platform/tests/test-cleanup.c +++ b/src/platform/tests/test-cleanup.c @@ -59,6 +59,22 @@ test_cleanup_internal (void) ifindex = nm_platform_link_get_ifindex (NM_PLATFORM_GET, DEVICE_NAME); g_assert (ifindex > 0); + /* wait for kernel to add the IPv6 link local address... it takes a bit. */ + NMTST_WAIT_ASSERT (100, { + gs_unref_array GArray *addrs = NULL; + const NMPlatformIP6Address *a; + + if (nmtst_wait_iteration > 0) { + nmtstp_wait_for_signal (NM_PLATFORM_GET, nmtst_wait_remaining_us / 1000); + nm_platform_process_events (NM_PLATFORM_GET); + } + addrs = nmtstp_platform_ip6_address_get_all (NM_PLATFORM_GET, ifindex); + if ( addrs->len == 1 + && (a = &g_array_index (addrs, NMPlatformIP6Address, 0)) + && IN6_IS_ADDR_LINKLOCAL (&a->address)) + break; + }); + /* Add routes and addresses */ g_assert (nm_platform_ip4_address_add (NM_PLATFORM_GET, ifindex, addr4, plen4, addr4, lifetime, preferred, 0, NULL)); g_assert (nm_platform_ip6_address_add (NM_PLATFORM_GET, ifindex, addr6, plen6, in6addr_any, lifetime, preferred, flags)); |