NetworkManager/NetworkManager-1.0.0-bridge_resume.patch

44 lines
1.7 KiB
Diff

From a687d1f9e0f75b987f40335934b54aa748f6724b Mon Sep 17 00:00:00 2001
From: Dan Williams <dcbw@redhat.com>
Date: Fri, 9 Jan 2015 15:47:54 -0600
Subject: 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
diff --git a/src/nm-manager.c b/src/nm-manager.c
index f3c5081..3d7b80d 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);
}
--
cgit v0.10.2