summaryrefslogtreecommitdiff
path: root/src/nm-manager.c
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2015-06-11 14:47:48 +0200
committerJiří Klimeš <jklimes@redhat.com>2015-06-11 15:18:59 +0200
commit72f155398a8410ceeb652fc5e8c9f264b9f9c2cf (patch)
tree907c082ac00fde4ae8341d97622607998f53d6eb /src/nm-manager.c
parent0dc5c4ab5a020fa4d73698b35d4ff2f025c74d8b (diff)
downloadNetworkManager-jk/master-bringup-slaves.tar.gz
fixup! core: activate slaves when master is activated (bgo #735052) (rh #1158529)jk/master-bringup-slaves
Diffstat (limited to 'src/nm-manager.c')
-rw-r--r--src/nm-manager.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 228b832945..f8cff41b45 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -2454,20 +2454,23 @@ should_connect_slaves (NMConnection *connection, NMDevice *device)
/* Check autoconnect-slaves property */
autoconnect_slaves = nm_setting_connection_get_autoconnect_slaves (s_con);
- if (autoconnect_slaves != NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_DEFAULT)
+ if ( autoconnect_slaves != NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_DEFAULT_NO
+ && autoconnect_slaves != NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_DEFAULT_YES)
goto out;
/* Check configuration default for autoconnect-slaves property */
value = nm_config_data_get_connection_default (nm_config_get_data (nm_config_get ()),
"connection.autoconnect-slaves", device);
if (value)
- autoconnect_slaves = _nm_utils_ascii_str_to_int64 (value, 10, 0, 1, -1);
+ autoconnect_slaves = _nm_utils_ascii_str_to_int64 (value, 10, -2, 1, -2);
out:
if (autoconnect_slaves == NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_NO)
return FALSE;
if (autoconnect_slaves == NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_YES)
return TRUE;
+ if (autoconnect_slaves == NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_DEFAULT_YES)
+ return TRUE;
return FALSE;
}