mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-04 01:20:36 +01:00
setting-connection: Unblock autoconnect upon finish of Reapply
The activation of a connection will clear the block of autoconnect, we should do the same for reapply. Signed-off-by: Gris Ge <fge@redhat.com> (cherry picked from commit0486efd358) (cherry picked from commit18ce5f43bd) (cherry picked from commit2695396939) (cherry picked from commit32d2e3c14b) (cherry picked from commit387ae9d7ff) (cherry picked from commit6f2c7733ce) (cherry picked from commit34f7499f3c)
This commit is contained in:
parent
2c0529de8f
commit
9b4cffc559
1 changed files with 9 additions and 0 deletions
|
|
@ -12651,6 +12651,7 @@ check_and_reapply_connection(NMDevice * self,
|
|||
NMSettingIPConfig * s_ip4_old, *s_ip4_new;
|
||||
NMSettingIPConfig * s_ip6_old, *s_ip6_new;
|
||||
GHashTableIter iter;
|
||||
NMSettingsConnection *sett_conn;
|
||||
|
||||
if (priv->state < NM_DEVICE_STATE_PREPARE || priv->state > NM_DEVICE_STATE_ACTIVATED) {
|
||||
g_set_error_literal(error,
|
||||
|
|
@ -12808,6 +12809,14 @@ check_and_reapply_connection(NMDevice * self,
|
|||
if (priv->state >= NM_DEVICE_STATE_ACTIVATED)
|
||||
nm_device_update_metered(self);
|
||||
|
||||
sett_conn = nm_device_get_settings_connection(self);
|
||||
if (sett_conn) {
|
||||
nm_settings_connection_autoconnect_blocked_reason_set(
|
||||
sett_conn,
|
||||
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST,
|
||||
FALSE);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue