summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-06-01 22:04:26 +0200
committerThomas Haller <thaller@redhat.com>2017-06-05 18:31:31 +0200
commitfcbcd1aa870ec5aa74c5c570ea08ffc52cffa63e (patch)
tree3aef041b97cd254c64cac393823ac3395ac6155a
parent3edfb6ac242b676e5bd94d6732e933e26d301530 (diff)
downloadNetworkManager-fcbcd1aa870ec5aa74c5c570ea08ffc52cffa63e.tar.gz
device: mark device as sys-iface-state=external when assuming connection
Since commit 74dac5f (nm-manager: try assuming connections on managed devices), and commit f4226e7 (manager: avoid generating in memory connections during startup for managed devices), recheck_assume_connection() also assumes connections on devices that are currently not in sys-iface-state "external". That is correct, as also for fully managed devices (which are currently in disconnected state), we want to assume external connections. However, when doing that, we must reset the sys-iface-state to external. https://bugzilla.redhat.com/show_bug.cgi?id=1457242 (cherry picked from commit 02e7476e9fd0f4248009ce8eaa7870ba05e2504e)
-rw-r--r--src/nm-manager.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 08da4049a8..939e5760e5 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -1884,8 +1884,10 @@ recheck_assume_connection (NMManager *self,
_LOGD (LOGD_DEVICE, "(%s): will attempt to assume connection",
nm_device_get_iface (device));
- if (!generated)
- nm_device_sys_iface_state_set (device, NM_DEVICE_SYS_IFACE_STATE_ASSUME);
+ nm_device_sys_iface_state_set (device,
+ generated
+ ? NM_DEVICE_SYS_IFACE_STATE_EXTERNAL
+ : NM_DEVICE_SYS_IFACE_STATE_ASSUME);
/* Move device to DISCONNECTED to activate the connection */
if (state == NM_DEVICE_STATE_UNMANAGED) {