|
|
fc9aca |
From b905393348574d8a363fe3fac4afb2fe6b03cfc0 Mon Sep 17 00:00:00 2001
|
|
|
fc9aca |
From: Thomas Haller <thaller@redhat.com>
|
|
|
fc9aca |
Date: Thu, 1 Jun 2017 22:04:26 +0200
|
|
|
fc9aca |
Subject: [PATCH 1/1] device: mark device as sys-iface-state=external when
|
|
|
fc9aca |
assuming connection
|
|
|
fc9aca |
|
|
|
fc9aca |
Since commit 74dac5f (nm-manager: try assuming connections on managed devices),
|
|
|
fc9aca |
and commit f4226e7 (manager: avoid generating in memory connections
|
|
|
fc9aca |
during startup for managed devices), recheck_assume_connection() also
|
|
|
fc9aca |
assumes connections on devices that are currently not in sys-iface-state
|
|
|
fc9aca |
"external".
|
|
|
fc9aca |
|
|
|
fc9aca |
That is correct, as also for fully managed devices (which are currently
|
|
|
fc9aca |
in disconnected state), we want to assume external connections. However,
|
|
|
fc9aca |
when doing that, we must reset the sys-iface-state to external.
|
|
|
fc9aca |
|
|
|
fc9aca |
https://bugzilla.redhat.com/show_bug.cgi?id=1457242
|
|
|
fc9aca |
(cherry picked from commit 02e7476e9fd0f4248009ce8eaa7870ba05e2504e)
|
|
|
fc9aca |
(cherry picked from commit fcbcd1aa870ec5aa74c5c570ea08ffc52cffa63e)
|
|
|
fc9aca |
---
|
|
|
fc9aca |
src/nm-manager.c | 6 ++++--
|
|
|
fc9aca |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
fc9aca |
|
|
|
fc9aca |
diff --git a/src/nm-manager.c b/src/nm-manager.c
|
|
|
fc9aca |
index 3d94ce9..283ceda 100644
|
|
|
fc9aca |
--- a/src/nm-manager.c
|
|
|
fc9aca |
+++ b/src/nm-manager.c
|
|
|
fc9aca |
@@ -1884,8 +1884,10 @@ recheck_assume_connection (NMManager *self,
|
|
|
fc9aca |
_LOGD (LOGD_DEVICE, "(%s): will attempt to assume connection",
|
|
|
fc9aca |
nm_device_get_iface (device));
|
|
|
fc9aca |
|
|
|
fc9aca |
- if (!generated)
|
|
|
fc9aca |
- nm_device_sys_iface_state_set (device, NM_DEVICE_SYS_IFACE_STATE_ASSUME);
|
|
|
fc9aca |
+ nm_device_sys_iface_state_set (device,
|
|
|
fc9aca |
+ generated
|
|
|
fc9aca |
+ ? NM_DEVICE_SYS_IFACE_STATE_EXTERNAL
|
|
|
fc9aca |
+ : NM_DEVICE_SYS_IFACE_STATE_ASSUME);
|
|
|
fc9aca |
|
|
|
fc9aca |
/* Move device to DISCONNECTED to activate the connection */
|
|
|
fc9aca |
if (state == NM_DEVICE_STATE_UNMANAGED) {
|
|
|
fc9aca |
--
|
|
|
fc9aca |
2.9.4
|
|
|
fc9aca |
|