]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
If we don't have a hwlen and no clientid has been set,
authorRoy Marples <roy@marples.name>
Tue, 18 Nov 2014 11:28:14 +0000 (11:28 +0000)
committerRoy Marples <roy@marples.name>
Tue, 18 Nov 2014 11:28:14 +0000 (11:28 +0000)
force a DUID based ClientID.

dhcpcd.c

index d6ac4258f80a0d886eb9656d4bdebe7fb8574e96..28dbe89f6f3d3f0b6ed2c5c0700d76c245ee0c22 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -383,9 +383,13 @@ configure_interface1(struct interface *ifp)
 
        /* If we haven't specified a ClientID and our hardware address
         * length is greater than DHCP_CHADDR_LEN then we enforce a ClientID
-        * of the hardware address family and the hardware address. */
+        * of the hardware address family and the hardware address.
+        * If there is no hardware address and no ClientID set,
+        * force a DUID based ClientID. */
        if (ifp->hwlen > DHCP_CHADDR_LEN)
                ifo->options |= DHCPCD_CLIENTID;
+       else if (ifp->hwlen == 0 && !(ifo->options & DHCPCD_CLIENTID))
+               ifo->options |= DHCPCD_CLIENTID | DHCPCD_DUID;
 
        /* Firewire and InfiniBand interfaces require ClientID and
         * the broadcast option being set. */