summaryrefslogtreecommitdiff
path: root/src/nm-ip6-config.h
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2016-03-14 18:37:57 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2016-05-22 14:20:05 +0200
commit7dbabe9bdca2d9c3b9df11bea52cdd500f699d31 (patch)
tree82f2347bd3a071ec6e4a4016971e0bb61ff413e7 /src/nm-ip6-config.h
parentf8cc73150fb2244191f6ba5ca046a3e5d5f03845 (diff)
downloadNetworkManager-7dbabe9bdca2d9c3b9df11bea52cdd500f699d31.tar.gz
device: wait for termination of IPv6 DAD before proceeding to IP_CHECK
Currently NM proceeds with the activation of a device just after the IPv6 configuration is applied. Server applications will bind to IPv6 addresses as soon as NM signals the presence of network connectivity, but since the addresses are still tentative the bind will fail. There are a couple of solutions to this. Linux kernel supports "optimistic DAD", which is a modification of Neighbor Discovery and SLAAC processes that allows addresses to be used (under certain contraints) while kernel is performing DAD on them. However it is not feasible to let NM enable optimistic DAD for the devices it controls for the following reasons: - it is not guaranteed to be always available since it can be turned off at compile time - RFC 4429 states that it should not be used for manually entered addresses - it works only with autoconf addresses generated by kernel Therefore, use a different approach and handle this in NM by waiting that the kernel completes DAD before continuing activation. We build a list of addresses that are tentative just after the new configuration is applied and then we asynchronously wait a platform address-change event where all NM-configured addresses become non-tentative. A similar solution has been adopted also by other network managing tools: https://anonscm.debian.org/cgit/collab-maint/ifupdown.git/commit/?id=ec357a5d6cb5fa8b0004c727d7cc48253c59eb0f https://github.com/systemd/systemd/commit/8012cd391932d58b44332df106d426a360faf0a6 https://bugzilla.redhat.com/show_bug.cgi?id=1243958
Diffstat (limited to 'src/nm-ip6-config.h')
-rw-r--r--src/nm-ip6-config.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nm-ip6-config.h b/src/nm-ip6-config.h
index 0aba5e9ff2..c3f8d9f879 100644
--- a/src/nm-ip6-config.h
+++ b/src/nm-ip6-config.h
@@ -90,6 +90,8 @@ const NMPlatformIP6Address *nm_ip6_config_get_address (const NMIP6Config *config
const NMPlatformIP6Address *nm_ip6_config_get_address_first_nontentative (const NMIP6Config *config, gboolean linklocal);
gboolean nm_ip6_config_address_exists (const NMIP6Config *config, const NMPlatformIP6Address *address);
gboolean nm_ip6_config_addresses_sort (NMIP6Config *config, NMSettingIP6ConfigPrivacy use_temporary);
+gboolean nm_ip6_config_has_any_dad_pending (const NMIP6Config *self,
+ const NMIP6Config *candidates);
/* Routes */
void nm_ip6_config_reset_routes (NMIP6Config *config);