core: workaround indefinite retries of activating connection

Workaround a serious issue, that a connection that failed to activate
might retry to autoconnect indefinitly.

In NMPolicy, device_state_changed() decrements the retry count for
autoconnect. But immediatly it calls nm_connection_clear_secrets(),
which in turn triggers an NM_SETTINGS_SIGNAL_CONNECTION_UPDATED signal.
The problem is, that connection_updated() resets the try count again to
the default, and thus, the counter was effictivly not decremented.

For now, do not reset the retry count in connection_updated(). This
works arount the issue, but means, that when a user changes the
connection, it is not immediatly retried to autoconnect (as the intent
originally was). This will be fixed later.

https://bugzilla.redhat.com/show_bug.cgi?id=1040528

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2013-12-11 16:32:11 +01:00
parent 5fad262b9f
commit e299d7b30f

View file

@ -1961,8 +1961,11 @@ connection_updated (NMSettings *settings,
firewall_update_zone (policy, connection);
/* Reset auto retries back to default since connection was updated */
set_connection_auto_retries (connection, RETRIES_DEFAULT);
/* FIXME: previously, we set_connection_auto_retries() again to
* RETRIES_DEFAULT, in order to re-enable a connection when it is changed
* by the user. This caused a serious problem, so remove it for now
* (rh #1040528).
**/
schedule_activate_all (policy);
}