Commit f913ed4d authored by Francesco Giudici's avatar Francesco Giudici

ifcfg: introduce DHCPV6_DUID to map ipv6.dhcp-duid property

parent e9321713
......@@ -866,6 +866,16 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *ip6_class)
*
* Since: 1.12
**/
/* ---ifcfg-rh---
* property: dhcp-duid
* variable: DHCPV6_DUID(+)
* description: A string sent to the DHCPv6 server to identify the local machine.
* Apart from the special values "lease", "stable-llt", "stable-ll", "stable-uuid",
* "llt" and "ll" a binary value in hex format is expected. An hex string where
* each octet is separated by a colon is also accepted.
* example: DHCPV6_DUID=LL; DHCPV6_DUID=0301deadbeef0001; DHCPV6_DUID=03:01:de:ad:be:ef:00:01
* ---end---
*/
g_object_class_install_property
(object_class, PROP_DHCP_DUID,
g_param_spec_string (NM_SETTING_IP6_CONFIG_DHCP_DUID, "", "",
......
......@@ -1823,6 +1823,11 @@ make_ip6_setting (shvarFile *ifcfg,
if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0)
return NM_SETTING (s_ip6);
nm_clear_g_free (&value);
v = svGetValueStr (ifcfg, "DHCPV6_DUID", &value);
if (v)
g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_DHCP_DUID, v, NULL);
nm_clear_g_free (&value);
v = svGetValueStr (ifcfg, "DHCPV6_HOSTNAME", &value);
/* Use DHCP_HOSTNAME as fallback if it is in FQDN format and ipv6.method is
......
......@@ -2568,6 +2568,7 @@ write_ip6_setting (NMConnection *connection,
svUnsetValue (ifcfg, "IPV6INIT");
svUnsetValue (ifcfg, "IPV6_AUTOCONF");
svUnsetValue (ifcfg, "DHCPV6C");
svUnsetValue (ifcfg, "DHCPv6_DUID");
svUnsetValue (ifcfg, "DHCPV6_HOSTNAME");
svUnsetValue (ifcfg, "DHCPV6_SEND_HOSTNAME");
svUnsetValue (ifcfg, "IPV6_DEFROUTE");
......@@ -2608,6 +2609,9 @@ write_ip6_setting (NMConnection *connection,
svUnsetValue (ifcfg, "DHCPV6C");
}
svSetValueStr (ifcfg, "DHCPV6_DUID",
nm_setting_ip6_config_get_dhcp_duid (NM_SETTING_IP6_CONFIG (s_ip6)));
write_ip6_setting_dhcp_hostname (s_ip6, ifcfg);
/* Write out IP addresses */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment