mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-23 08:30:07 +01:00
ifcfg-rh: add IPV4_DHCP_TIMEOUT key for ipv4.dhcp-timeout property
https://bugzilla.redhat.com/show_bug.cgi?id=1262922
This commit is contained in:
parent
c17ab1b6ff
commit
fdbf4ae5e6
2 changed files with 8 additions and 2 deletions
|
|
@ -1014,8 +1014,8 @@ make_ip4_setting (shvarFile *ifcfg,
|
||||||
g_free (value);
|
g_free (value);
|
||||||
|
|
||||||
g_object_set (s_ip4,
|
g_object_set (s_ip4,
|
||||||
NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME,
|
NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME, svTrueValue (ifcfg, "DHCP_SEND_HOSTNAME", TRUE),
|
||||||
svTrueValue (ifcfg, "DHCP_SEND_HOSTNAME", TRUE),
|
NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT, svGetValueInt64 (ifcfg, "IPV4_DHCP_TIMEOUT", 10, 0, G_MAXUINT32, 0),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
value = svGetValue (ifcfg, "DHCP_CLIENT_ID", FALSE);
|
value = svGetValue (ifcfg, "DHCP_CLIENT_ID", FALSE);
|
||||||
|
|
|
||||||
|
|
@ -1916,6 +1916,7 @@ write_ip4_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
|
||||||
gint32 j;
|
gint32 j;
|
||||||
guint32 i, n, num;
|
guint32 i, n, num;
|
||||||
gint64 route_metric;
|
gint64 route_metric;
|
||||||
|
int dhcp_timeout;
|
||||||
GString *searches;
|
GString *searches;
|
||||||
gboolean success = FALSE;
|
gboolean success = FALSE;
|
||||||
gboolean fake_ip4 = FALSE;
|
gboolean fake_ip4 = FALSE;
|
||||||
|
|
@ -2119,6 +2120,11 @@ write_ip4_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
|
||||||
value = nm_setting_ip4_config_get_dhcp_client_id (NM_SETTING_IP4_CONFIG (s_ip4));
|
value = nm_setting_ip4_config_get_dhcp_client_id (NM_SETTING_IP4_CONFIG (s_ip4));
|
||||||
if (value)
|
if (value)
|
||||||
svSetValue (ifcfg, "DHCP_CLIENT_ID", value, FALSE);
|
svSetValue (ifcfg, "DHCP_CLIENT_ID", value, FALSE);
|
||||||
|
|
||||||
|
dhcp_timeout = nm_setting_ip4_config_get_dhcp_timeout (NM_SETTING_IP4_CONFIG (s_ip4));
|
||||||
|
tmp = dhcp_timeout ? g_strdup_printf ("%d", dhcp_timeout) : NULL;
|
||||||
|
svSetValue (ifcfg, "IPV4_DHCP_TIMEOUT", tmp, FALSE);
|
||||||
|
g_free (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
svSetValue (ifcfg, "IPV4_FAILURE_FATAL",
|
svSetValue (ifcfg, "IPV4_FAILURE_FATAL",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue