diff options
| author | Iain Lane <iain@orangesquash.org.uk> | 2018-09-24 09:29:55 +0100 |
|---|---|---|
| committer | Iain Lane <iain@orangesquash.org.uk> | 2018-09-24 09:29:55 +0100 |
| commit | e152ec7bf4ba252ff9d3eb13eabd417b931dac9a (patch) | |
| tree | c323cf856ee0bb8e44590670dd54c19653a55748 /libnm-core/nm-setting-ip4-config.c | |
| parent | ee9c73a923909e23a649407be77e25235d769e25 (diff) | |
Import Upstream version 1.12.2
Diffstat (limited to 'libnm-core/nm-setting-ip4-config.c')
| -rw-r--r-- | libnm-core/nm-setting-ip4-config.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/libnm-core/nm-setting-ip4-config.c b/libnm-core/nm-setting-ip4-config.c index d9c0cbb1..0c668d8c 100644 --- a/libnm-core/nm-setting-ip4-config.c +++ b/libnm-core/nm-setting-ip4-config.c @@ -363,7 +363,7 @@ ip4_addresses_set (NMSetting *setting, if (g_variant_lookup (s_ip4, "address-labels", "^as", &labels)) { for (i = 0; i < addrs->len && labels[i]; i++) if (*labels[i]) - nm_ip_address_set_attribute (addrs->pdata[i], "label", g_variant_new_string (labels[i])); + nm_ip_address_set_attribute (addrs->pdata[i], NM_IP_ADDRESS_ATTRIBUTE_LABEL, g_variant_new_string (labels[i])); g_strfreev (labels); } g_variant_unref (s_ip4); @@ -391,7 +391,7 @@ ip4_address_labels_get (NMSetting *setting, num_addrs = nm_setting_ip_config_get_num_addresses (s_ip); for (i = 0; i < num_addrs; i++) { NMIPAddress *addr = nm_setting_ip_config_get_address (s_ip, i); - GVariant *label = nm_ip_address_get_attribute (addr, "label"); + GVariant *label = nm_ip_address_get_attribute (addr, NM_IP_ADDRESS_ATTRIBUTE_LABEL); if (label) { have_labels = TRUE; @@ -404,7 +404,7 @@ ip4_address_labels_get (NMSetting *setting, labels = g_ptr_array_sized_new (num_addrs); for (i = 0; i < num_addrs; i++) { NMIPAddress *addr = nm_setting_ip_config_get_address (s_ip, i); - GVariant *label = nm_ip_address_get_attribute (addr, "label"); + GVariant *label = nm_ip_address_get_attribute (addr, NM_IP_ADDRESS_ATTRIBUTE_LABEL); g_ptr_array_add (labels, (char *) (label ? g_variant_get_string (label, NULL) : "")); } @@ -524,7 +524,6 @@ ip4_route_data_set (NMSetting *setting, return TRUE; } - static void nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *ip4_class) { @@ -719,13 +718,24 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *ip4_class) * ARP type and the rest is a MAC address). * If the property is not a hex string it is considered as a * non-hardware-address client ID and the 'type' field is set to 0. + * + * The special values "mac" and "perm-mac" are supported, which use the + * current or permanent MAC address of the device to generate a client identifier + * with type ethernet type (01). Currently, these options only work for ethernet + * type of links. + * + * The special value "stable" is supported to generate a type 0 client identifier based + * on the stable-id (see connection.stable-id) and a per-host key. + * + * If unset, a globally configured default is used. If still unset, the + * client-id from the last lease is reused. **/ /* ---ifcfg-rh--- * property: dhcp-client-id * variable: DHCP_CLIENT_ID(+) * description: A string sent to the DHCP server to identify the local machine. * A binary value can be specified using hex notation ('aa:bb:cc'). - * example: DHCP_CLIENT_ID=ax-srv-1; DHCP_CLIENT_ID=01:44:44:44:44:44:44" + * example: DHCP_CLIENT_ID=ax-srv-1; DHCP_CLIENT_ID=01:44:44:44:44:44:44 * ---end--- */ g_object_class_install_property @@ -737,11 +747,12 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *ip4_class) /* ---ifcfg-rh--- * property: dad-timeout - * variable: ARPING_WAIT - * default: missing variable means global default (config override or 3) - * description: Timeout (in seconds) for performing DAD before configuring - * IPv4 addresses. 0 turns off the DAD completely, -1 means default value. - * example: ARPING_WAIT=2 + * variable: ACD_TIMEOUT, ARPING_WAIT + * default: missing variable means global default (config override or zero) + * description: Timeout (in milliseconds for ACD_TIMEOUT or in seconds + * for ARPING_WAIT) for address conflict detection before configuring + * IPv4 addresses. 0 turns off the ACD completely, -1 means default value. + * example: ACD_TIMEOUT=2000 or ARPING_WAIT=2 * ---end--- */ |