diff options
author | Dan Williams <dcbw@redhat.com> | 2015-01-09 15:47:54 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2015-01-12 09:57:13 -0600 |
commit | a687d1f9e0f75b987f40335934b54aa748f6724b (patch) | |
tree | ac0e614f038dc9afd3f8dd825fe5d3ee5be785bd | |
parent | c9002c041d996eb1f8ce5e8efe75c9466a98ae8a (diff) | |
download | NetworkManager-a687d1f9e0f75b987f40335934b54aa748f6724b.tar.gz |
core: ensure manager state is updated on resume with connectivity checking enabled (rh #1162636) (bgo #742675)
On resume configured interfaces are unmanaged to clear their pre-resume
state and then re-managed. Eventually the interface should end up moving
to the DISCONNECTED state, which should trigger an auto-activate check in
the Policy. If connectivity checking was enabled, that auto-activate check
would fail because the Manager's state was still NM_STATE_ASLEEP.
This caused bridge slaves not to auto-activate on resume, which left bridges
without connectivity.
The manager never left NM_STATE_ASLEEP when connectivity checking was
enabled due to nm_manager_update_state() returning early when kicking
off a connectivity check. Instead, the manager's state should always
be updated to accurately reflect the current state.
https://bugzilla.redhat.com/show_bug.cgi?id=1162636
https://bugzilla.gnome.org/show_bug.cgi?id=742675
-rw-r--r-- | src/nm-manager.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c index f3c508180a..3d7b80dc95 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -645,10 +645,9 @@ nm_manager_update_state (NMManager *manager) nm_connectivity_check_async (priv->connectivity, checked_connectivity, g_object_ref (manager)); - return; - } + } else + nm_connectivity_set_online (priv->connectivity, new_state >= NM_STATE_CONNECTED_LOCAL); - nm_connectivity_set_online (priv->connectivity, new_state >= NM_STATE_CONNECTED_LOCAL); set_state (manager, new_state); } |