From 98b4b4754e0de31eeb9e041daa793bb3ed2d6549 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Sat, 6 May 2017 10:47:23 +0200 Subject: Revert "device: synchronize IPv6 configuration in stage3" update_ip6_config() also removes addresses and routes no longer present externally from the configuration, so it can't be called before the changes are committed. This reverts commit 8f4caab60196132c2fd0eb4a444f93f78f130e8e. (cherry picked from commit d626298b48775a0ae6144b4f4287b4cea2388d46) --- src/devices/nm-device.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 255a0571b6..0363317302 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -531,7 +531,6 @@ static void realize_start_setup (NMDevice *self, static void _commit_mtu (NMDevice *self, const NMIP4Config *config); static void dhcp_schedule_restart (NMDevice *self, int family, const char *reason); static void _cancel_activation (NMDevice *self); -static void update_ip6_config (NMDevice *self, gboolean initial, gboolean check_ll); /*****************************************************************************/ @@ -7719,13 +7718,6 @@ act_stage3_ip6_config_start (NMDevice *self, /* Re-enable IPv6 on the interface */ set_disable_ipv6 (self, "0"); - /* Synchronize IPv6 configuration with kernel, since linklocal6_start() - * uses the information there to determine if we can proceed with the - * selected method (SLAAC, DHCP, link-local). - */ - nm_platform_process_events (nm_device_get_platform (self)); - update_ip6_config (self, FALSE, FALSE); - ip6_privacy = _ip6_privacy_get (self); if ( strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_AUTO) == 0 @@ -10657,7 +10649,7 @@ _ip6_config_subtract (gpointer value, gpointer user_data) } static void -update_ip6_config (NMDevice *self, gboolean initial, gboolean check_ll) +update_ip6_config (NMDevice *self, gboolean initial) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); int ifindex; @@ -10722,8 +10714,7 @@ update_ip6_config (NMDevice *self, gboolean initial, gboolean check_ll) ip6_config_merge_and_apply (self, FALSE); } - if ( check_ll - && priv->linklocal6_timeout_id + if ( priv->linklocal6_timeout_id && priv->ext_ip6_config_captured && nm_ip6_config_get_address_first_nontentative (priv->ext_ip6_config_captured, TRUE)) { /* linklocal6 is ready now, do the state transition... we are also @@ -10737,7 +10728,7 @@ void nm_device_capture_initial_config (NMDevice *self) { update_ip4_config (self, TRUE); - update_ip6_config (self, TRUE, TRUE); + update_ip6_config (self, TRUE); } static gboolean @@ -10783,7 +10774,7 @@ queued_ip6_config_change (gpointer user_data) return TRUE; priv->queued_ip6_config_id = 0; - update_ip6_config (self, FALSE, TRUE); + update_ip6_config (self, FALSE); if (priv->state < NM_DEVICE_STATE_DEACTIVATING && nm_platform_link_get (nm_device_get_platform (self), priv->ifindex)) { -- cgit v1.2.1