mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-20 12:50:33 +01:00
policy: fix hostname lookup from DNS
Fixes: 09c8387114 ('policy: use the hostname setting')
This commit is contained in:
parent
fda6b702ba
commit
5b9479a728
1 changed files with 1 additions and 1 deletions
|
|
@ -940,7 +940,7 @@ update_system_hostname(NMPolicy *self, const char *msg)
|
|||
|
||||
if (priv->hostname_mode != NM_POLICY_HOSTNAME_MODE_DHCP) {
|
||||
for (IS_IPv4 = 1; IS_IPv4 >= 0; IS_IPv4--) {
|
||||
const int addr_family = IS_IPv4 ? AF_INET6 : AF_INET;
|
||||
const int addr_family = IS_IPv4 ? AF_INET : AF_INET6;
|
||||
|
||||
if (info->from_dns && info->ip_x[IS_IPv4]) {
|
||||
const char *result;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue