diff options
author | Thomas Haller <thaller@redhat.com> | 2017-03-08 16:06:21 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-03-16 18:27:33 +0100 |
commit | 7a5e0c7fd77ecf158a668ccf979378a7ac58438f (patch) | |
tree | 15a3cd4fde4f624dfb5f7ac00580d9ed050347b5 | |
parent | bde67825918669bc7a6eb31669ea806a960a3ac4 (diff) | |
download | NetworkManager-7a5e0c7fd77ecf158a668ccf979378a7ac58438f.tar.gz |
core: once activated an assumed connection make it NM_ACTIVATION_TYPE_MANAGED
-rw-r--r-- | src/nm-active-connection.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index 29c7334950..1cdef98cef 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -110,6 +110,8 @@ static void _device_cleanup (NMActiveConnection *self); static void _settings_connection_notify_flags (NMSettingsConnection *settings_connection, GParamSpec *param, NMActiveConnection *self); +static void _set_activation_type (NMActiveConnection *self, + NMActivationType activation_type); /*****************************************************************************/ @@ -223,6 +225,14 @@ nm_active_connection_set_state (NMActiveConnection *self, state_to_string (new_state), state_to_string (priv->state)); + if ( new_state == NM_ACTIVE_CONNECTION_STATE_ACTIVATED + && priv->activation_type == NM_ACTIVATION_TYPE_ASSUME) { + /* assuming connections mean to gracefully take over an externally + * configured device. Once activation is complete, an assumed + * activation *is* the same as a full activation. */ + _set_activation_type (self, NM_ACTIVATION_TYPE_MANAGED); + } + old_state = priv->state; priv->state = new_state; priv->state_set = TRUE; |