]> git.ipfire.org Git - thirdparty/dhcp.git/blobdiff - client/dhc6.c
fix DUID-LTT epoch
[thirdparty/dhcp.git] / client / dhc6.c
index 77376e7bb34b8a21fb50baef12897d0444068ef3..37cdab61f008093749d7817b41b9933d82948978 100644 (file)
@@ -135,7 +135,7 @@ form_duid(struct data_string *duid, const char *file, int line)
        /* Basic Link Local Address type of DUID. */
        putUShort(duid->buffer->data, DUID_LLT);
        putUShort(duid->buffer->data + 2, ip->hw_address.hbuf[0]);
-       putULong(duid->buffer->data + 4, cur_time);
+       putULong(duid->buffer->data + 4, cur_time - DUID_TIME_EPOCH);
        memcpy(duid->buffer->data + 8, ip->hw_address.hbuf + 1,
               ip->hw_address.hlen - 1);
 }