summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libnm-core/nm-setting-ip6-config.c8
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c7
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c1
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h2
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c7
5 files changed, 21 insertions, 4 deletions
diff --git a/libnm-core/nm-setting-ip6-config.c b/libnm-core/nm-setting-ip6-config.c
index eba7bc7f9d..d4c89939c0 100644
--- a/libnm-core/nm-setting-ip6-config.c
+++ b/libnm-core/nm-setting-ip6-config.c
@@ -662,6 +662,14 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *klass)
*/
/* ---ifcfg-rh---
+ * property: dhcp-timeout
+ * variable: IPV6_DHCP_TIMEOUT(+)
+ * description: A timeout after which the DHCP transaction fails in case of no response.
+ * example: IPV6_DHCP_TIMEOUT=10
+ * ---end---
+ */
+
+ /* ---ifcfg-rh---
* property: dhcp-hostname-flags
* variable: DHCPV6_HOSTNAME_FLAGS
* description: flags for the DHCP hostname property
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
index e2b4a6c724..0052bdb65f 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
@@ -2203,9 +2203,10 @@ make_ip6_setting (shvarFile *ifcfg,
if (v)
g_object_set (s_ip6, NM_SETTING_IP_CONFIG_DHCP_HOSTNAME, v, NULL);
- g_object_set (s_ip6, NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME,
- svGetValueBoolean (ifcfg, "DHCPV6_SEND_HOSTNAME", TRUE), NULL);
-
+ g_object_set (s_ip6,
+ NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME, svGetValueBoolean (ifcfg, "DHCPV6_SEND_HOSTNAME", TRUE),
+ NM_SETTING_IP_CONFIG_DHCP_TIMEOUT, (int) svGetValueInt64 (ifcfg, "IPV6_DHCP_TIMEOUT", 10, 0, G_MAXINT32, 0),
+ NULL);
i64 = svGetValueInt64 (ifcfg, "DHCPV6_HOSTNAME_FLAGS", 10, 0, G_MAXUINT32, -1);
if (i64 > -1) {
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c
index 2bf638d517..46c7666baa 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c
@@ -806,6 +806,7 @@ const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[] = {
_KEY_TYPE ("IPV6_DEFAULTDEV", NMS_IFCFG_KEY_TYPE_IS_PLAIN ),
_KEY_TYPE ("IPV6_DEFAULTGW", NMS_IFCFG_KEY_TYPE_IS_PLAIN ),
_KEY_TYPE ("IPV6_DEFROUTE", NMS_IFCFG_KEY_TYPE_IS_PLAIN ),
+ _KEY_TYPE ("IPV6_DHCP_TIMEOUT", NMS_IFCFG_KEY_TYPE_IS_PLAIN ),
_KEY_TYPE ("IPV6_DISABLED", NMS_IFCFG_KEY_TYPE_IS_PLAIN ),
_KEY_TYPE ("IPV6_DNS_PRIORITY", NMS_IFCFG_KEY_TYPE_IS_PLAIN ),
_KEY_TYPE ("IPV6_DOMAIN", NMS_IFCFG_KEY_TYPE_IS_PLAIN ),
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h
index ae0573e115..aaae59679d 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h
@@ -33,7 +33,7 @@ typedef struct {
NMSIfcfgKeyTypeFlags key_flags;
} NMSIfcfgKeyTypeInfo;
-extern const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[227];
+extern const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[228];
const NMSIfcfgKeyTypeInfo *nms_ifcfg_well_known_key_find_info (const char *key, gssize *out_idx);
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
index daccadab68..e9a17b5ce3 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c
@@ -2631,6 +2631,7 @@ write_ip6_setting (NMConnection *connection,
NMSettingIP6ConfigAddrGenMode addr_gen_mode;
NMDhcpHostnameFlags flags;
const char *hostname;
+ int timeout;
NM_SET_OUT (out_route6_content, NULL);
@@ -2679,6 +2680,12 @@ write_ip6_setting (NMConnection *connection,
if (!nm_setting_ip_config_get_dhcp_send_hostname (s_ip6))
svSetValueStr (ifcfg, "DHCPV6_SEND_HOSTNAME", "no");
+ timeout = nm_setting_ip_config_get_dhcp_timeout (s_ip6);
+ svSetValueInt64_cond (ifcfg,
+ "IPV6_DHCP_TIMEOUT",
+ timeout != 0,
+ timeout);
+
flags = nm_setting_ip_config_get_dhcp_hostname_flags (s_ip6);
svSetValueInt64_cond (ifcfg,
"DHCPV6_HOSTNAME_FLAGS",