mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-22 01:49:35 +00:00
fix DUID-LTT epoch
This commit is contained in:
parent
00a002fc76
commit
7e9f7a1bcf
3
RELNOTES
3
RELNOTES
@ -156,6 +156,9 @@ work on other platforms. Please report any problems and suggested fixes to
|
||||
- Fix startup error messages to report a missing "subnet6 declaration", rather
|
||||
than a missing "subnet declaration", when running as a DHCPv6 server.
|
||||
|
||||
- DHCPv6 client timestamp in DUID was based on the year 1970 rather
|
||||
than the year 2000.
|
||||
|
||||
Changes since 4.0.0b3
|
||||
|
||||
- The reverse dns name for PTR updates on IPv6 addresses has been fixed to
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -195,3 +195,10 @@ struct dhcpv6_relay_packet {
|
||||
|
||||
#define LQ6QT_BY_ADDRESS 1
|
||||
#define LQ6QT_BY_CLIENTID 2
|
||||
|
||||
/*
|
||||
* DUID time starts 2000-01-01.
|
||||
* This constant is the number of seconds since 1970-01-01,
|
||||
* when the Unix epoch began.
|
||||
*/
|
||||
#define DUID_TIME_EPOCH 946684800
|
||||
|
@ -112,13 +112,6 @@ static isc_result_t reply_process_send_addr(struct reply_state *reply,
|
||||
struct iaddr *addr);
|
||||
static struct iaaddr *lease_compare(struct iaaddr *alpha, struct iaaddr *beta);
|
||||
|
||||
/*
|
||||
* DUID time starts 2000-01-01.
|
||||
* This constant is the number of seconds since 1970-01-01,
|
||||
* when the Unix epoch began.
|
||||
*/
|
||||
#define DUID_TIME_EPOCH 946684800
|
||||
|
||||
/*
|
||||
* This function returns the time since DUID time start for the
|
||||
* given time_t value.
|
||||
|
Loading…
x
Reference in New Issue
Block a user