merge: branch 'fg/auto_neg_specmodes-rh1487477'

https://bugzilla.redhat.com/show_bug.cgi?id=1487477
This commit is contained in:
Francesco Giudici 2018-06-15 14:20:37 +02:00
commit 046f759982
9 changed files with 139 additions and 75 deletions

View file

@ -88,9 +88,9 @@
#define DESCRIBE_DOC_NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD_FLAGS N_("Flags indicating how to handle the \"private-key-password\" property.")
#define DESCRIBE_DOC_NM_SETTING_802_1X_SUBJECT_MATCH N_("Substring to be matched against the subject of the certificate presented by the authentication server. When unset, no verification of the authentication server certificate's subject is performed. This property provides little security, if any, and its use is deprecated in favor of NMSetting8021x:domain-suffix-match.")
#define DESCRIBE_DOC_NM_SETTING_802_1X_SYSTEM_CA_CERTS N_("When TRUE, overrides the \"ca-path\" and \"phase2-ca-path\" properties using the system CA directory specified at configure time with the --system-ca-path switch. The certificates in this directory are added to the verification chain in addition to any certificates specified by the \"ca-cert\" and \"phase2-ca-cert\" properties. If the path provided with --system-ca-path is rather a file name (bundle of trusted CA certificates), it overrides \"ca-cert\" and \"phase2-ca-cert\" properties instead (sets ca_cert/ca_cert2 options for wpa_supplicant).")
#define DESCRIBE_DOC_NM_SETTING_WIRED_AUTO_NEGOTIATE N_("If TRUE, enforce auto-negotiation of port speed and duplex mode. If FALSE, \"speed\" and \"duplex\" properties should be both set or link configuration will be skipped.")
#define DESCRIBE_DOC_NM_SETTING_WIRED_AUTO_NEGOTIATE N_("When TRUE, enforce auto-negotiation of speed and duplex mode. If \"speed\" and \"duplex\" properties are both specified, only that single mode will be advertised and accepted during the link auto-negotiation process: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabits modes, as in these cases link negotiation is mandatory. When FALSE, \"speed\" and \"duplex\" properties should be both set or link configuration will be skipped.")
#define DESCRIBE_DOC_NM_SETTING_WIRED_CLONED_MAC_ADDRESS N_("If specified, request that the device use this MAC address instead. This is known as MAC cloning or spoofing. Beside explicitly specifying a MAC address, the special values \"preserve\", \"permanent\", \"random\" and \"stable\" are supported. \"preserve\" means not to touch the MAC address on activation. \"permanent\" means to use the permanent hardware address if the device has one (otherwise this is treated as \"preserve\"). \"random\" creates a random MAC address on each connect. \"stable\" creates a hashed MAC address based on connection.stable-id and a machine dependent key. If unspecified, the value can be overwritten via global defaults, see manual of NetworkManager.conf. If still unspecified, it defaults to \"preserve\" (older versions of NetworkManager may use a different default value). On D-Bus, this field is expressed as \"assigned-mac-address\" or the deprecated \"cloned-mac-address\".")
#define DESCRIBE_DOC_NM_SETTING_WIRED_DUPLEX N_("Can be specified only when \"auto-negotiate\" is \"off\". In that case, statically configures the device to use that specified duplex mode, either \"half\" or \"full\". Must be set together with the \"speed\" property if specified. Before specifying a duplex mode be sure your device supports it.")
#define DESCRIBE_DOC_NM_SETTING_WIRED_DUPLEX N_("When a value is set, either \"half\" or \"full\", configures the device to use the specified duplex mode. If \"auto-negotiate\" is \"yes\" the specified duplex mode will be the only one advertised during link negotiation: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabits modes, as in these cases link negotiation is mandatory. If the value is unset (the default), the link configuration will be either skipped (if \"auto-negotiate\" is \"no\", the default) or will be auto-negotiated (if \"auto-negotiate\" is \"yes\") and the local device will advertise all the supported duplex modes. Must be set together with the \"speed\" property if specified. Before specifying a duplex mode be sure your device supports it.")
#define DESCRIBE_DOC_NM_SETTING_WIRED_GENERATE_MAC_ADDRESS_MASK N_("With \"cloned-mac-address\" setting \"random\" or \"stable\", by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address. If the property is NULL, it is eligible to be overwritten by a default connection setting. If the value is still NULL or an empty string, the default is to create a locally-administered, unicast MAC address. If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting \"FE:FF:FF:00:00:00\" means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the \"random\" or \"stable\" algorithm. If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of \"FE:FF:FF:00:00:00 68:F7:28:00:00:00\" will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of \"02:00:00:00:00:00 00:00:00:00:00:00\" will create a fully scrambled globally-administered, burned-in MAC address. If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, \"02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00\" will create a fully scrambled MAC address, randomly locally or globally administered.")
#define DESCRIBE_DOC_NM_SETTING_WIRED_MAC_ADDRESS N_("If specified, this connection will only apply to the Ethernet device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).")
#define DESCRIBE_DOC_NM_SETTING_WIRED_MAC_ADDRESS_BLACKLIST N_("If specified, this connection will never apply to the Ethernet device whose permanent MAC address matches an address in the list. Each MAC address is in the standard hex-digits-and-colons notation (00:11:22:33:44:55).")
@ -100,7 +100,7 @@
#define DESCRIBE_DOC_NM_SETTING_WIRED_S390_NETTYPE N_("s390 network device type; one of \"qeth\", \"lcs\", or \"ctc\", representing the different types of virtual network devices available on s390 systems.")
#define DESCRIBE_DOC_NM_SETTING_WIRED_S390_OPTIONS N_("Dictionary of key/value pairs of s390-specific device options. Both keys and values must be strings. Allowed keys include \"portno\", \"layer2\", \"portname\", \"protocol\", among others. Key names must contain only alphanumeric characters (ie, [a-zA-Z0-9]).")
#define DESCRIBE_DOC_NM_SETTING_WIRED_S390_SUBCHANNELS N_("Identifies specific subchannels that this network device uses for communication with z/VM or s390 host. Like the \"mac-address\" property for non-z/VM devices, this property can be used to ensure this connection only applies to the network device that uses these subchannels. The list should contain exactly 3 strings, and each string may only be composed of hexadecimal characters and the period (.) character.")
#define DESCRIBE_DOC_NM_SETTING_WIRED_SPEED N_("Can be set to a value greater than zero only when \"auto-negotiate\" is \"off\". In that case, statically configures the device to use that specified speed. In Mbit/s, ie 100 == 100Mbit/s. Must be set together with the \"duplex\" property when non-zero. Before specifying a speed value be sure your device supports it.")
#define DESCRIBE_DOC_NM_SETTING_WIRED_SPEED N_("When a value grater than 0 is set, configures the device to use the specified speed. If \"auto-negotiate\" is \"yes\" the specified speed will be the only one advertised during link negotiation: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabit speeds, as in this case link negotiation is mandatory. If the value is unset (0, the default), the link configuration will be either skipped (if \"auto-negotiate\" is \"no\", the default) or will be auto-negotiated (if \"auto-negotiate\" is \"yes\") and the local device will advertise all the supported speeds. In Mbit/s, ie 100 == 100Mbit/s. Must be set together with the \"duplex\" property when non-zero. Before specifying a speed value be sure your device supports it.")
#define DESCRIBE_DOC_NM_SETTING_WIRED_WAKE_ON_LAN N_("The NMSettingWiredWakeOnLan options to enable. Not all devices support all options. May be any combination of NM_SETTING_WIRED_WAKE_ON_LAN_PHY (0x2), NM_SETTING_WIRED_WAKE_ON_LAN_UNICAST (0x4), NM_SETTING_WIRED_WAKE_ON_LAN_MULTICAST (0x8), NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST (0x10), NM_SETTING_WIRED_WAKE_ON_LAN_ARP (0x20), NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC (0x40) or the special values NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT (0x1) (to use global settings) and NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE (0x8000) (to disable management of Wake-on-LAN in NetworkManager).")
#define DESCRIBE_DOC_NM_SETTING_WIRED_WAKE_ON_LAN_PASSWORD N_("If specified, the password used with magic-packet-based Wake-on-LAN, represented as an Ethernet MAC address. If NULL, no password will be required.")
#define DESCRIBE_DOC_NM_SETTING_ADSL_ENCAPSULATION N_("Encapsulation of ADSL connection. Can be \"vcmux\" or \"llc\".")

View file

@ -791,13 +791,11 @@ _normalize_ethernet_link_neg (NMConnection *self)
NMSettingWired *s_wired = nm_connection_get_setting_wired (self);
if (s_wired) {
gboolean autoneg = nm_setting_wired_get_auto_negotiate (s_wired);
guint32 speed = nm_setting_wired_get_speed (s_wired);
const char *duplex = nm_setting_wired_get_duplex (s_wired);
if ( (autoneg && (speed || duplex))
|| (!autoneg && ( (speed && !duplex)
|| (!speed && duplex)))) {
if ( (speed && !duplex)
|| (!speed && duplex)) {
speed = 0;
duplex = NULL;
g_object_set (s_wired,

View file

@ -762,32 +762,16 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
* with legacy nm-connection-editor which used to save "full" duplex connection as default
*/
if (priv->auto_negotiate) {
if (priv->duplex) {
g_set_error_literal (error,
NM_CONNECTION_ERROR,
NM_CONNECTION_ERROR_INVALID_PROPERTY,
_("when link autonegotiation is enabled no duplex value is accepted"));
g_prefix_error (error, "%s.%s: ", NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_DUPLEX);
return NM_SETTING_VERIFY_NORMALIZABLE;
}
if (priv->speed) {
g_set_error_literal (error,
NM_CONNECTION_ERROR,
NM_CONNECTION_ERROR_INVALID_PROPERTY,
_("when link autonegotiation is enabled speed should be 0"));
g_prefix_error (error, "%s.%s: ", NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_SPEED);
return NM_SETTING_VERIFY_NORMALIZABLE;
}
} else {
if ( ((priv->speed) && (!priv->duplex))
|| ((!priv->speed) && (priv->duplex))) {
g_set_error_literal (error,
NM_CONNECTION_ERROR,
NM_CONNECTION_ERROR_INVALID_PROPERTY,
_("both speed and duplex are required for static link configuration"));
return NM_SETTING_VERIFY_NORMALIZABLE;
}
if ( ((priv->speed) && (!priv->duplex))
|| ((!priv->speed) && (priv->duplex))) {
g_set_error_literal (error,
NM_CONNECTION_ERROR,
NM_CONNECTION_ERROR_INVALID_PROPERTY,
priv->auto_negotiate ?
_("both speed and duplex should have a valid value or both should be unset")
: _("both speed and duplex are required for static link configuration"));
return NM_SETTING_VERIFY_NORMALIZABLE;
}
return TRUE;
@ -1033,8 +1017,16 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class)
/**
* NMSettingWired:speed:
*
* Can be set to a value greater than zero only when "auto-negotiate" is "off".
* In that case, statically configures the device to use that specified speed.
* When a value grater than 0 is set, configures the device to use
* the specified speed. If "auto-negotiate" is "yes" the specified
* speed will be the only one advertised during link negotiation:
* this works only for BASE-T 802.3 specifications and is useful for
* enforcing gigabit speeds, as in this case link negotiation is
* mandatory.
* If the value is unset (0, the default), the link configuration will be
* either skipped (if "auto-negotiate" is "no", the default) or will
* be auto-negotiated (if "auto-negotiate" is "yes") and the local device
* will advertise all the supported speeds.
* In Mbit/s, ie 100 == 100Mbit/s.
* Must be set together with the "duplex" property when non-zero.
* Before specifying a speed value be sure your device supports it.
@ -1057,8 +1049,16 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class)
/**
* NMSettingWired:duplex:
*
* Can be specified only when "auto-negotiate" is "off". In that case, statically
* configures the device to use that specified duplex mode, either "half" or "full".
* When a value is set, either "half" or "full", configures the device
* to use the specified duplex mode. If "auto-negotiate" is "yes" the
* specified duplex mode will be the only one advertised during link
* negotiation: this works only for BASE-T 802.3 specifications and is
* useful for enforcing gigabits modes, as in these cases link negotiation
* is mandatory.
* If the value is unset (the default), the link configuration will be
* either skipped (if "auto-negotiate" is "no", the default) or will
* be auto-negotiated (if "auto-negotiate" is "yes") and the local device
* will advertise all the supported duplex modes.
* Must be set together with the "speed" property if specified.
* Before specifying a duplex mode be sure your device supports it.
**/
@ -1079,9 +1079,14 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class)
/**
* NMSettingWired:auto-negotiate:
*
* If %TRUE, enforce auto-negotiation of port speed and duplex mode. If
* %FALSE, "speed" and "duplex" properties should be both set or link configuration
* will be skipped.
* When %TRUE, enforce auto-negotiation of speed and duplex mode.
* If "speed" and "duplex" properties are both specified, only that
* single mode will be advertised and accepted during the link
* auto-negotiation process: this works only for BASE-T 802.3 specifications
* and is useful for enforcing gigabits modes, as in these cases link
* negotiation is mandatory.
* When %FALSE, "speed" and "duplex" properties should be both set or
* link configuration will be skipped.
**/
/* ---ifcfg-rh---
* property: auto-negotiate

View file

@ -753,13 +753,6 @@ supplicant_interface_init (NMDeviceEthernet *self)
return TRUE;
}
NM_UTILS_LOOKUP_STR_DEFINE_STATIC (link_duplex_to_string, NMPlatformLinkDuplexType,
NM_UTILS_LOOKUP_DEFAULT_WARN (NULL),
NM_UTILS_LOOKUP_STR_ITEM (NM_PLATFORM_LINK_DUPLEX_UNKNOWN, "unknown"),
NM_UTILS_LOOKUP_STR_ITEM (NM_PLATFORM_LINK_DUPLEX_FULL, "full"),
NM_UTILS_LOOKUP_STR_ITEM (NM_PLATFORM_LINK_DUPLEX_HALF, "half"),
);
static NMPlatformLinkDuplexType
link_duplex_to_platform (const char *duplex)
{
@ -787,13 +780,11 @@ link_negotiation_set (NMDevice *device)
s_wired = (NMSettingWired *) nm_device_get_applied_setting (device, NM_TYPE_SETTING_WIRED);
if (s_wired) {
autoneg = nm_setting_wired_get_auto_negotiate (s_wired);
if (!autoneg) {
speed = nm_setting_wired_get_speed (s_wired);
duplex = link_duplex_to_platform (nm_setting_wired_get_duplex (s_wired));
if (!speed && !duplex) {
_LOGD (LOGD_DEVICE, "set-link: ignore link negotiation");
return;
}
speed = nm_setting_wired_get_speed (s_wired);
duplex = link_duplex_to_platform (nm_setting_wired_get_duplex (s_wired));
if (!autoneg && !speed && !duplex) {
_LOGD (LOGD_DEVICE, "set-link: ignore link negotiation");
return;
}
}
@ -804,20 +795,23 @@ link_negotiation_set (NMDevice *device)
}
/* If link negotiation setting are already in place do nothing and return with success */
if ( (!!autoneg == !!link_autoneg)
&& (!speed || (speed == link_speed))
&& (!duplex || (duplex == link_duplex))) {
if ( !!autoneg == !!link_autoneg
&& speed == link_speed
&& duplex == link_duplex) {
_LOGD (LOGD_DEVICE, "set-link: link negotiation is already configured");
return;
}
if (autoneg)
_LOGD (LOGD_DEVICE, "set-link: configure autonegotiation");
if (autoneg && !speed && !duplex)
_LOGD (LOGD_DEVICE, "set-link: configure auto-negotiation");
else {
_LOGD (LOGD_DEVICE, "set-link: configure static negotiation (%u Mbit%s - %s duplex%s)",
_LOGD (LOGD_DEVICE, "set-link: configure %snegotiation (%u Mbit%s - %s duplex%s)",
autoneg ? "auto-" : "static ",
speed ?: link_speed,
speed ? "" : "*",
duplex ? link_duplex_to_string (duplex) : link_duplex_to_string (link_duplex),
duplex
? nm_platform_link_duplex_type_to_string (duplex)
: nm_platform_link_duplex_type_to_string (link_duplex),
duplex ? "" : "*");
}

View file

@ -384,6 +384,40 @@ nmp_utils_ethtool_get_link_settings (int ifindex,
return TRUE;
}
#define ADVERTISED_INVALID 0
#define BASET_ALL_MODES ( ADVERTISED_10baseT_Half \
| ADVERTISED_10baseT_Full \
| ADVERTISED_100baseT_Half \
| ADVERTISED_100baseT_Full \
| ADVERTISED_1000baseT_Half \
| ADVERTISED_1000baseT_Full \
| ADVERTISED_10000baseT_Full )
static inline guint32
get_baset_mode (guint32 speed, NMPlatformLinkDuplexType duplex)
{
if (duplex == NM_PLATFORM_LINK_DUPLEX_UNKNOWN)
return ADVERTISED_INVALID;
if (duplex == NM_PLATFORM_LINK_DUPLEX_HALF) {
switch (speed) {
case 10: return ADVERTISED_10baseT_Half;
case 100: return ADVERTISED_100baseT_Half;
case 1000: return ADVERTISED_1000baseT_Half;
default: return ADVERTISED_INVALID;
}
} else {
switch (speed) {
case 10: return ADVERTISED_10baseT_Full;
case 100: return ADVERTISED_100baseT_Full;
case 1000: return ADVERTISED_1000baseT_Full;
case 10000: return ADVERTISED_10000baseT_Full;
default: return ADVERTISED_INVALID;
}
}
}
gboolean
nmp_utils_ethtool_set_link_settings (int ifindex,
gboolean autoneg,
@ -395,6 +429,8 @@ nmp_utils_ethtool_set_link_settings (int ifindex,
};
g_return_val_if_fail (ifindex > 0, FALSE);
g_return_val_if_fail ( (speed && duplex != NM_PLATFORM_LINK_DUPLEX_UNKNOWN)
|| (!speed && duplex == NM_PLATFORM_LINK_DUPLEX_UNKNOWN), FALSE);
/* retrieve first current settings */
if (!ethtool_get (ifindex, &edata))
@ -404,7 +440,31 @@ nmp_utils_ethtool_set_link_settings (int ifindex,
edata.cmd = ETHTOOL_SSET;
if (autoneg) {
edata.autoneg = AUTONEG_ENABLE;
edata.advertising = edata.supported;
if (!speed)
edata.advertising = edata.supported;
else {
guint32 mode;
mode = get_baset_mode (speed, duplex);
if (!mode) {
nm_log_trace (LOGD_PLATFORM,
"ethtool[%d]: %uBASE-T %s duplex mode cannot be advertised",
ifindex,
speed,
nm_platform_link_duplex_type_to_string (duplex));
return FALSE;
}
if (!(edata.supported & mode)) {
nm_log_trace (LOGD_PLATFORM,
"ethtool[%d]: device does not support %uBASE-T %s duplex mode",
ifindex,
speed,
nm_platform_link_duplex_type_to_string (duplex));
return FALSE;
}
edata.advertising = (edata.supported & ~BASET_ALL_MODES) | mode;
}
} else {
edata.autoneg = AUTONEG_DISABLE;

View file

@ -3005,6 +3005,13 @@ nm_platform_ethtool_get_link_settings (NMPlatform *self, int ifindex, gboolean *
return nmp_utils_ethtool_get_link_settings (ifindex, out_autoneg, out_speed, out_duplex);
}
NM_UTILS_LOOKUP_STR_DEFINE (nm_platform_link_duplex_type_to_string, NMPlatformLinkDuplexType,
NM_UTILS_LOOKUP_DEFAULT_WARN (NULL),
NM_UTILS_LOOKUP_STR_ITEM (NM_PLATFORM_LINK_DUPLEX_UNKNOWN, "unknown"),
NM_UTILS_LOOKUP_STR_ITEM (NM_PLATFORM_LINK_DUPLEX_FULL, "full"),
NM_UTILS_LOOKUP_STR_ITEM (NM_PLATFORM_LINK_DUPLEX_HALF, "half"),
);
/*****************************************************************************/
const NMDedupMultiHeadEntry *

View file

@ -1452,6 +1452,7 @@ int nm_platform_ip_address_cmp_expiry (const NMPlatformIPAddress *a, const NMPla
gboolean nm_platform_ethtool_set_wake_on_lan (NMPlatform *self, int ifindex, NMSettingWiredWakeOnLan wol, const char *wol_password);
gboolean nm_platform_ethtool_set_link_settings (NMPlatform *self, int ifindex, gboolean autoneg, guint32 speed, NMPlatformLinkDuplexType duplex);
gboolean nm_platform_ethtool_get_link_settings (NMPlatform *self, int ifindex, gboolean *out_autoneg, guint32 *out_speed, NMPlatformLinkDuplexType *out_duplex);
const char * nm_platform_link_duplex_type_to_string (NMPlatformLinkDuplexType duplex);
void nm_platform_ip4_dev_route_blacklist_set (NMPlatform *self,
int ifindex,

View file

@ -4174,8 +4174,8 @@ parse_ethtool_options (shvarFile *ifcfg, NMSettingWired *s_wired, const char *va
NM_SETTING_WIRED_WAKE_ON_LAN, wol_flags,
NM_SETTING_WIRED_WAKE_ON_LAN_PASSWORD, ignore_wol_password ? NULL : wol_password,
NM_SETTING_WIRED_AUTO_NEGOTIATE, autoneg,
NM_SETTING_WIRED_SPEED, autoneg ? 0 : speed,
NM_SETTING_WIRED_DUPLEX, autoneg ? NULL : duplex,
NM_SETTING_WIRED_SPEED, speed,
NM_SETTING_WIRED_DUPLEX, duplex,
NULL);
}

View file

@ -1135,6 +1135,9 @@ write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
/* Stuff ETHTOOL_OPT with required options */
str = NULL;
auto_negotiate = nm_setting_wired_get_auto_negotiate (s_wired);
speed = nm_setting_wired_get_speed (s_wired);
duplex = nm_setting_wired_get_duplex (s_wired);
/* autoneg off + speed 0 + duplex NULL, means we want NM
* to skip link configuration which is default. So write
* down link config only if we have auto-negotiate true or
@ -1143,18 +1146,14 @@ write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
if (auto_negotiate) {
str = g_string_sized_new (64);
g_string_printf (str, "autoneg on");
} else {
speed = nm_setting_wired_get_speed (s_wired);
duplex = nm_setting_wired_get_duplex (s_wired);
if (speed || duplex) {
str = g_string_sized_new (64);
g_string_printf (str, "autoneg off");
if (speed)
g_string_append_printf (str, " speed %u", speed);
if (duplex)
g_string_append_printf (str, " duplex %s", duplex);
}
} else if (speed || duplex) {
str = g_string_sized_new (64);
g_string_printf (str, "autoneg off");
}
if (speed)
g_string_append_printf (str, " speed %u", speed);
if (duplex)
g_string_append_printf (str, " duplex %s", duplex);
wol = nm_setting_wired_get_wake_on_lan (s_wired);
wol_password = nm_setting_wired_get_wake_on_lan_password (s_wired);