From 8881c11f939a653771e181a272ae00b7a8c7c057 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 6 Sep 2017 13:21:39 +0200 Subject: [PATCH] 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. --- src/nm-policy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 */