ip6: don't 'assume' IPv6 connections (bgo #676740)
[NetworkManager.git] / src / nm-device.c
index 5499ccf..885fb49 100644 (file)
@@ -246,7 +246,6 @@ static gboolean nm_device_set_ip4_config (NMDevice *dev,
                                           NMDeviceStateReason *reason);
 static gboolean nm_device_set_ip6_config (NMDevice *dev,
                                           NMIP6Config *config,
-                                          gboolean assumed,
                                           NMDeviceStateReason *reason);
 
 static gboolean nm_device_activate_ip6_config_commit (gpointer user_data);
@@ -1821,7 +1820,7 @@ ip6_config_merge_and_apply (NMDevice *self,
 {
        NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
        NMConnection *connection;
-       gboolean assumed, success;
+       gboolean success;
        NMIP6Config *composite;
 
        connection = nm_device_get_connection (self);
@@ -1844,8 +1843,7 @@ ip6_config_merge_and_apply (NMDevice *self,
        /* Merge user overrides into the composite config */
        nm_utils_merge_ip6_config (composite, nm_connection_get_setting_ip6_config (connection));
 
-       assumed = nm_act_request_get_assumed (priv->act_request);
-       success = nm_device_set_ip6_config (self, composite, assumed, out_reason);
+       success = nm_device_set_ip6_config (self, composite, out_reason);
        g_object_unref (composite);
        return success;
 }
@@ -3185,7 +3183,7 @@ nm_device_deactivate (NMDevice *self, NMDeviceStateReason reason)
 
        /* Clean up nameservers and addresses */
        nm_device_set_ip4_config (self, NULL, FALSE, &ignored);
-       nm_device_set_ip6_config (self, NULL, FALSE, &ignored);
+       nm_device_set_ip6_config (self, NULL, &ignored);
 }
 
 gboolean
@@ -3489,7 +3487,6 @@ nm_device_set_ip4_config (NMDevice *self,
 static gboolean
 nm_device_set_ip6_config (NMDevice *self,
                           NMIP6Config *new_config,
-                          gboolean assumed,
                           NMDeviceStateReason *reason)
 {
        NMDevicePrivate *priv;
@@ -3527,13 +3524,9 @@ nm_device_set_ip6_config (NMDevice *self,
        if (new_config) {
                priv->ip6_config = g_object_ref (new_config);
 
-               /* Don't touch the device's actual IP config if the connection is
-                * assumed when NM starts.
-                */
-               if (!assumed)
-                       success = nm_system_apply_ip6_config (ip_ifindex, new_config, nm_device_get_priority (self), diff);
+               success = nm_system_apply_ip6_config (ip_ifindex, new_config, nm_device_get_priority (self), diff);
 
-               if (success || assumed) {
+               if (success) {
                        /* Export over D-Bus */
                        if (!nm_ip6_config_get_dbus_path (new_config))
                                nm_ip6_config_export (new_config);