about summary refs log tree commit diff
path: root/libnm-core/nm-setting-wired.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-core/nm-setting-wired.c')
-rw-r--r--libnm-core/nm-setting-wired.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c
index 3d0c5b64..c38b1874 100644
--- a/libnm-core/nm-setting-wired.c
+++ b/libnm-core/nm-setting-wired.c
@@ -696,12 +696,12 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
 		return FALSE;
 	}
 
-	if (   NM_FLAGS_HAS (priv->wol, NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT)
-	    && NM_FLAGS_ANY (priv->wol, NM_SETTING_WIRED_WAKE_ON_LAN_ALL)) {
+	if (   NM_FLAGS_ANY (priv->wol, NM_SETTING_WIRED_WAKE_ON_LAN_EXCLUSIVE_FLAGS)
+	    && !nm_utils_is_power_of_two (priv->wol)) {
 		g_set_error_literal (error,
 		                     NM_CONNECTION_ERROR,
 		                     NM_CONNECTION_ERROR_INVALID_PROPERTY,
-		                     _("Wake-on-LAN mode 'default' is incompatible with other flags"));
+		                     _("Wake-on-LAN mode 'default' and 'ignore' are exclusive flags"));
 		g_prefix_error (error, "%s.%s: ", NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_WAKE_ON_LAN);
 		return FALSE;
 	}
@@ -1190,7 +1190,10 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_class)
 	 * May be any combination of %NM_SETTING_WIRED_WAKE_ON_LAN_PHY,
 	 * %NM_SETTING_WIRED_WAKE_ON_LAN_UNICAST, %NM_SETTING_WIRED_WAKE_ON_LAN_MULTICAST,
 	 * %NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST, %NM_SETTING_WIRED_WAKE_ON_LAN_ARP,
-	 * %NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC.
+	 * %NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC or the special values
+	 * %NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT (to use global settings) and
+	 * %NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE (to disable management of Wake-on-LAN in
+	 * NetworkManager).
 	 *
 	 * Since: 1.0.6
 	 **/