summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2020-07-22 13:49:42 +0200
committerAntonio Cardace <acardace@redhat.com>2020-09-29 12:53:45 +0200
commit7c46ff24e546e3be05d594a12e4dbfb34ecc9d9f (patch)
tree694e79a66c4d805577781d79b1a1983bbda51866
parent293b00c947f916857c525f4f95552ccf5bee6e24 (diff)
downloadNetworkManager-7c46ff24e546e3be05d594a12e4dbfb34ecc9d9f.tar.gz
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 1f74ea52f5818c6e7d5cacd1dffdb2e1f5ee1913) (cherry picked from commit 4e1da002a920888daf5bb3aa4bd21a2d61e3214b)
-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 ed3f8b20d1..f235897457 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -766,7 +766,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]) {