summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RELNOTES5
-rw-r--r--server/dhcpd.c22
-rw-r--r--server/dhcpd.conf.54
3 files changed, 21 insertions, 10 deletions
diff --git a/RELNOTES b/RELNOTES
index 3324e0aa..f30356ef 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -94,6 +94,11 @@ by Eric Young (eay@cryptsoft.com).
reasonable to remove it.
[ISC-Buts #39019]
+- Write out the DUID server id on startup in all cases, previously if it
+ was read in from server-duid option in the config or lease files for
+ DHCPv4 it would not be written to the new lease file.
+ [ISC-Bugs #37791]
+
Changes since 4.3.2rc2
- None
diff --git a/server/dhcpd.c b/server/dhcpd.c
index 8b24b641..3d2aa09a 100644
--- a/server/dhcpd.c
+++ b/server/dhcpd.c
@@ -705,19 +705,21 @@ main(int argc, char **argv) {
#ifdef DHCPv6
/*
- * Set server DHCPv6 identifier.
+ * Set server DHCPv6 identifier - we go in order:
+ * dhcp6.server-id in the config file
+ * server-duid from the lease file
+ * server-duid from the config file (the config file is read first
+ * and the lease file overwrites the config file information)
+ * genrate a new one
+ * In all cases we write it out to the lease file.
* See dhcpv6.c for discussion of setting DUID.
*/
- if (set_server_duid_from_option() == ISC_R_SUCCESS) {
- write_server_duid();
- } else {
- if (!server_duid_isset()) {
- if (generate_new_server_duid() != ISC_R_SUCCESS) {
- log_fatal("Unable to set server identifier.");
- }
- write_server_duid();
- }
+ if ((set_server_duid_from_option() != ISC_R_SUCCESS) &&
+ (!server_duid_isset()) &&
+ (generate_new_server_duid() != ISC_R_SUCCESS)) {
+ log_fatal("Unable to set server identifier.");
}
+ write_server_duid();
#endif /* DHCPv6 */
#ifndef DEBUG
diff --git a/server/dhcpd.conf.5 b/server/dhcpd.conf.5
index 20b2ebbb..4c3491f3 100644
--- a/server/dhcpd.conf.5
+++ b/server/dhcpd.conf.5
@@ -2964,6 +2964,10 @@ Otherwise the server will generate a DUID of the specified type.
If you choose EN, you must include the enterprise number and the
enterprise-identifier.
.PP
+If there is a server-duid statement in the lease file it will take precedence
+over the server-duid statement from the config file and a
+dhcp6.server-id option in the config file will override both.
+.PP
The default server-duid type is LLT.
.RE
.PP