manager: don't upgrade the state when connectivity check fails

If a connection is ACTIVATED and another one is ACTIVATING but there
is no global connectivity, we currently set the manager state to
CONNECTING and start a connectivity check to verify whether the
manager state can be promoted to CONNECTED_GLOBAL.

If this connectivity check fails, we shouldn't promote a CONNECTING
state to CONNECTED_SITE.

Fixes: 084da69a30
This commit is contained in:
Beniamino Galvani 2016-12-12 14:34:21 +01:00
parent 4cc45ee291
commit 7375822c95

View file

@ -757,9 +757,7 @@ checked_connectivity (GObject *object, GAsyncResult *result, gpointer user_data)
if (connectivity == NM_CONNECTIVITY_FULL)
set_state (manager, NM_STATE_CONNECTED_GLOBAL);
else if ( connectivity == NM_CONNECTIVITY_PORTAL
|| connectivity == NM_CONNECTIVITY_LIMITED)
set_state (manager, NM_STATE_CONNECTED_SITE);
_notify (manager, PROP_CONNECTIVITY);
}