summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2017-07-19 15:03:09 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2017-07-25 17:47:01 +0200
commit4b51f5b1a848523123a441e836d07c3b1fb102f4 (patch)
tree1cab36666fffb091a07169d6d152d4e588e4ab31
parente260f2a08aaea2911735ea6481864e5a28e64753 (diff)
downloadNetworkManager-4b51f5b1a848523123a441e836d07c3b1fb102f4.tar.gz
libnm-core: improve documentation for ipv4.dhcp-client-id property
https://bugzilla.redhat.com/show_bug.cgi?id=1468358
-rw-r--r--clients/common/settings-docs.c.in2
-rw-r--r--libnm-core/nm-setting-ip4-config.c10
2 files changed, 10 insertions, 2 deletions
diff --git a/clients/common/settings-docs.c.in b/clients/common/settings-docs.c.in
index 8ba4a159bd..e92152b3e8 100644
--- a/clients/common/settings-docs.c.in
+++ b/clients/common/settings-docs.c.in
@@ -206,7 +206,7 @@
#define DESCRIBE_DOC_NM_SETTING_IP_TUNNEL_TTL N_("The TTL to assign to tunneled packets. 0 is a special value meaning that packets inherit the TTL value.")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_ADDRESSES N_("Array of IP addresses.")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DAD_TIMEOUT N_("Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or 3 seconds). A value greater than zero is a timeout in milliseconds.")
-#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID N_("A string sent to the DHCP server to identify the local machine which the DHCP server may use to customize the DHCP lease and options.")
+#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID N_("A string sent to the DHCP server to identify the local machine which the DHCP server may use to customize the DHCP lease and options. When the property is a hex string ('aa:bb:cc') it is interpreted as a binary client ID, in which case the first byte is assumed to be the 'type' field as per RFC 2132 section 9.14 and the remaining bytes may be an hardware address (e.g. '01:xx:xx:xx:xx:xx:xx' where 1 is the Ethernet 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.")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_FQDN N_("If the \"dhcp-send-hostname\" property is TRUE, then the specified FQDN will be sent to the DHCP server when acquiring a lease. This property and \"dhcp-hostname\" are mutually exclusive and cannot be set at the same time.")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME N_("If the \"dhcp-send-hostname\" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and \"dhcp-fqdn\" are mutually exclusive and cannot be set at the same time.")
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME N_("If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the \"dhcp-hostname\" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent.")
diff --git a/libnm-core/nm-setting-ip4-config.c b/libnm-core/nm-setting-ip4-config.c
index 79d72cc96e..3b17ba16a9 100644
--- a/libnm-core/nm-setting-ip4-config.c
+++ b/libnm-core/nm-setting-ip4-config.c
@@ -696,12 +696,20 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *ip4_class)
*
* A string sent to the DHCP server to identify the local machine which the
* DHCP server may use to customize the DHCP lease and options.
+ * When the property is a hex string ('aa:bb:cc') it is interpreted as a
+ * binary client ID, in which case the first byte is assumed to be the
+ * 'type' field as per RFC 2132 section 9.14 and the remaining bytes may be
+ * an hardware address (e.g. '01:xx:xx:xx:xx:xx:xx' where 1 is the Ethernet
+ * 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.
**/
/* ---ifcfg-rh---
* property: dhcp-client-id
* variable: DHCP_CLIENT_ID(+)
* description: A string sent to the DHCP server to identify the local machine.
- * example: DHCP_CLIENT_ID=ax-srv-1
+ * 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"
* ---end---
*/
g_object_class_install_property