mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-16 12:21:37 +01:00
ifcfg-rh: belatedly add support for "ipv6.dhcp-timeout" setting
(cherry picked from commit 843c546b84)
This commit is contained in:
parent
fe6c3f0867
commit
60ef3a3e59
3 changed files with 19 additions and 3 deletions
|
|
@ -657,6 +657,14 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *klass)
|
|||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---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
|
||||
|
|
|
|||
|
|
@ -2159,9 +2159,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) {
|
||||
|
|
|
|||
|
|
@ -2767,6 +2767,7 @@ write_ip6_setting (NMConnection *connection,
|
|||
NMSettingIP6ConfigAddrGenMode addr_gen_mode;
|
||||
NMDhcpHostnameFlags flags;
|
||||
const char *hostname;
|
||||
int timeout;
|
||||
|
||||
NM_SET_OUT (out_route6_content, NULL);
|
||||
|
||||
|
|
@ -2844,6 +2845,12 @@ write_ip6_setting (NMConnection *connection,
|
|||
else
|
||||
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",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue