Commit 4e74670b authored by Dan Winship's avatar Dan Winship

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.
parent 828c3160
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment