Commit 4e1da002 authored by Beniamino Galvani's avatar Beniamino Galvani

policy: get the DHCPv6 hostname from the FQDN option

There isn't any 'host-name' option for DHCPv6. Read instead the
'fqdn-fqdn' option that carries the FQDN assigned by the server to the
client.

(cherry picked from commit 1f74ea52)
parent c6a7618f
......@@ -764,7 +764,7 @@ update_system_hostname (NMPolicy *self, const char *msg)
/* Grab a hostname out of the device's DHCP6 config */
dhcp_config = nm_device_get_dhcp_config (get_default_device (self, AF_INET6), AF_INET6);
if (dhcp_config) {
dhcp_hostname = nm_dhcp_config_get_option (dhcp_config, "host_name");
dhcp_hostname = nm_dhcp_config_get_option (dhcp_config, "fqdn_fqdn");
if (dhcp_hostname && dhcp_hostname[0]) {
p = nm_str_skip_leading_spaces (dhcp_hostname);
if (p[0]) {
......
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