summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-09-06 13:21:39 +0200
committerThomas Haller <thaller@redhat.com>2017-09-08 11:05:04 +0200
commit8881c11f939a653771e181a272ae00b7a8c7c057 (patch)
tree2c7d6f047182e4ec754d9d20d0271b5c5fa9f192
parent9574472f9b8f7841d7e0ffb7a1eefa39214e8263 (diff)
downloadNetworkManager-8881c11f939a653771e181a272ae00b7a8c7c057.tar.gz
policy: always check for hostname from DHCPv6 in update_system_hostname()
There is no reason for if-else-if. If DHCPv4 doesn't provide a hostname (but we are doing DHCP), just check for DHCPv6.
-rw-r--r--src/nm-policy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 2d4dc7e03b..3d8c73e464 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -683,7 +683,9 @@ update_system_hostname (NMPolicy *self, NMDevice *best4, NMDevice *best6, const
dhcp_hostname);
}
}
- } else if (best6) {
+ }
+
+ if (best6) {
NMDhcp6Config *dhcp6_config;
/* Grab a hostname out of the device's DHCP6 config */