diff --git a/man/NetworkManager.conf.xml.in b/man/NetworkManager.conf.xml.in
index 9bf1388bea..53f46d10b5 100644
--- a/man/NetworkManager.conf.xml.in
+++ b/man/NetworkManager.conf.xml.in
@@ -583,6 +583,11 @@ ipv6.ip6-privacy=1
ipv4.route-metric
+
+ ipv4.dhcp-timeout
+ If left unspecified, the default value for
+ the interface type is used.
+
ipv6.ip6-privacy
If ipv6.ip6-privacy is unset, use the content of
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index fcd5dfe576..eeffbe95b8 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -3883,6 +3883,28 @@ dhcp4_state_changed (NMDhcpClient *client,
}
}
+static int
+dhcp4_get_timeout (NMDevice *self, NMSettingIP4Config *s_ip4)
+{
+ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ gs_free char *value = NULL;
+ int timeout;
+
+ timeout = nm_setting_ip4_config_get_dhcp_timeout (s_ip4);
+ if (timeout)
+ return timeout;
+
+ value = nm_config_data_get_connection_default (NM_CONFIG_GET_DATA,
+ "ipv4.dhcp-timeout",
+ self);
+ timeout = _nm_utils_ascii_str_to_int64 (value, 10,
+ 0, G_MAXINT32, 0);
+ if (timeout)
+ return timeout;
+
+ return priv->dhcp_timeout;
+}
+
static NMActStageReturn
dhcp4_start (NMDevice *self,
NMConnection *connection,
@@ -3918,7 +3940,7 @@ dhcp4_start (NMDevice *self,
nm_setting_ip_config_get_dhcp_send_hostname (s_ip4),
nm_setting_ip_config_get_dhcp_hostname (s_ip4),
nm_setting_ip4_config_get_dhcp_client_id (NM_SETTING_IP4_CONFIG (s_ip4)),
- nm_setting_ip4_config_get_dhcp_timeout (NM_SETTING_IP4_CONFIG (s_ip4)) ?: priv->dhcp_timeout,
+ dhcp4_get_timeout (self, NM_SETTING_IP4_CONFIG (s_ip4)),
priv->dhcp_anycast_address,
NULL);