From: Roy Marples Date: Tue, 10 Dec 2013 13:15:19 +0000 (+0000) Subject: Fix sending of DHCPv6 FQDN when only hostname specified X-Git-Tag: v6.2.0~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=613cc14a1d0eda7e0f9b8d6f4bce2ec64929ee73;p=thirdparty%2Fdhcpcd.git Fix sending of DHCPv6 FQDN when only hostname specified --- diff --git a/dhcp6.c b/dhcp6.c index b1352734..330ba6a5 100644 --- a/dhcp6.c +++ b/dhcp6.c @@ -375,12 +375,13 @@ dhcp6_makemessage(struct interface *ifp) ifo = ifp->options; fqdn = ifo->fqdn; - if (fqdn == FQDN_DISABLE || ifo->options & DHCPCD_HOSTNAME) { + if (fqdn == FQDN_DISABLE && ifo->options & DHCPCD_HOSTNAME) { /* We're sending the DHCPv4 hostname option, so send FQDN as * DHCPv6 has no FQDN option and DHCPv4 must not send * hostname and FQDN according to RFC4702 */ - if (fqdn == FQDN_DISABLE) - fqdn = FQDN_BOTH; + fqdn = FQDN_BOTH; + } + if (fqdn != FQDN_DISABLE) { if (ifo->hostname[0] == '\0') hostname = get_hostname(ifo->options & DHCPCD_HOSTNAME_SHORT ? 1 : 0);