mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-14 03:10:30 +01:00
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 commit1f74ea52f5) (cherry picked from commit4e1da002a9) (cherry picked from commit7c46ff24e5)
This commit is contained in:
parent
66fc5bd354
commit
ed3f959dca
1 changed files with 1 additions and 1 deletions
|
|
@ -770,7 +770,7 @@ update_system_hostname (NMPolicy *self, const char *msg)
|
|||
/* Grab a hostname out of the device's DHCP6 config */
|
||||
dhcp6_config = nm_device_get_dhcp6_config (get_default_device (self, AF_INET6));
|
||||
if (dhcp6_config) {
|
||||
dhcp_hostname = nm_dhcp6_config_get_option (dhcp6_config, "host_name");
|
||||
dhcp_hostname = nm_dhcp6_config_get_option (dhcp6_config, "fqdn_fqdn");
|
||||
if (dhcp_hostname && dhcp_hostname[0]) {
|
||||
p = nm_str_skip_leading_spaces (dhcp_hostname);
|
||||
if (p[0]) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue