mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-12 05:40:17 +01:00
core: clarify clearing of autoconnect-blocked state
NMPolicy was clearing the autoconnect-blocked state on a connection any time a device with that connection changed state. This happened to basically do the right thing, but it would be clearer if we only reset the state after successfully getting past the NEED_AUTH stage.
This commit is contained in:
parent
828c316080
commit
4e74670b47
1 changed files with 4 additions and 3 deletions
|
|
@ -1364,9 +1364,6 @@ device_state_changed (NMDevice *device,
|
|||
NMIP6Config *ip6_config;
|
||||
NMSettingConnection *s_con;
|
||||
|
||||
if (connection)
|
||||
nm_settings_connection_set_autoconnect_blocked_reason (connection, NM_DEVICE_STATE_REASON_NONE);
|
||||
|
||||
switch (new_state) {
|
||||
case NM_DEVICE_STATE_FAILED:
|
||||
/* Mark the connection invalid if it failed during activation so that
|
||||
|
|
@ -1460,6 +1457,10 @@ device_state_changed (NMDevice *device,
|
|||
* activation. */
|
||||
activate_slave_connections (policy, device);
|
||||
break;
|
||||
case NM_DEVICE_STATE_IP_CONFIG:
|
||||
/* We must have secrets if we got here. */
|
||||
nm_settings_connection_set_autoconnect_blocked_reason (connection, NM_DEVICE_STATE_REASON_NONE);
|
||||
break;
|
||||
case NM_DEVICE_STATE_SECONDARIES:
|
||||
s_con = nm_connection_get_setting_connection (NM_CONNECTION (connection));
|
||||
if (s_con && nm_setting_connection_get_num_secondaries (s_con) > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue