From e04c9af5fddb0c2e159206af1c5464117ed8bfbc Mon Sep 17 00:00:00 2001 From: Francesco Giudici Date: Mon, 11 Sep 2017 18:22:11 +0200 Subject: [PATCH] nmcli: allow to set dhcp-timeout as "infinity" DHCP timeout may now be explicitly disabled by setting the ipv[4,6].dhcp-timeout options to "infinity". This will set the DHCP timeout value to MAXINT32. --- clients/common/nm-meta-setting-desc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index 4a4eb13ab1..6a9ad8e34a 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -5364,6 +5364,19 @@ static const NMMetaPropertyInfo *const property_infos_IP4_CONFIG[] = { ), PROPERTY_INFO (NM_SETTING_IP_CONFIG_DHCP_TIMEOUT, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT, .property_type = &_pt_gobject_int, + .property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int, + .value_infos = INT_VALUE_INFOS ( + { + .value = 0, + .nick = "default", + }, + { + .value = G_MAXINT32, + .nick = "infinity", + } + ), + ), + ), PROPERTY_INFO (NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME, .property_type = &_pt_gobject_bool,