summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2020-07-22 13:49:42 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2020-08-06 10:16:09 +0200
commit1f74ea52f5818c6e7d5cacd1dffdb2e1f5ee1913 (patch)
tree1d74039ddd14afd9a26fa8bda4b16b4a3bc6c858 /src
parent1621a6ddb1b3f5c51ad774012150bd56cf65fcea (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/nm-policy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c
index d0ddeb9c3e..1490d90611 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -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]) {