summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2017-06-19 14:44:29 -0400
committerThomas Markwalder <tmark@isc.org>2017-06-19 14:44:29 -0400
commitca22af89996483efd820de0084c964fc336ee7c1 (patch)
tree678b882c7e3c70bc1db5a746a187816f858b4296 /client
parent24f10d6d9c05e975b279656d2bee927d98902095 (diff)
downloadisc-dhcp-ca22af89996483efd820de0084c964fc336ee7c1.tar.gz
[master] Optimized if and when DNS client context and ports are initted
Merges in rt45290.
Diffstat (limited to 'client')
-rw-r--r--client/dhclient.85
-rw-r--r--client/dhclient.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/client/dhclient.8 b/client/dhclient.8
index a00f1f77..24f8f122 100644
--- a/client/dhclient.8
+++ b/client/dhclient.8
@@ -493,8 +493,9 @@ port will be used for the established connection.
When DDNS is enabled at compile time (see includes/site.h)
the client will open both a v4 and a v6 UDP socket on
-random ports. These ports are opened even if DDNS is disabled
-in the configuration file.
+random ports. These ports are not opened unless/until the
+client first attempts to do an update. If the client is not
+configured to do updates, the ports will never be opened.
.PP
.SH CONFIGURATION
The syntax of the \fBdhclient.conf(5)\fR file is discussed separately.
diff --git a/client/dhclient.c b/client/dhclient.c
index 129aba72..40fd876a 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -315,8 +315,8 @@ main(int argc, char **argv) {
}
/* Set up the isc and dns library managers */
- status = dhcp_context_create(DHCP_CONTEXT_PRE_DB | DHCP_CONTEXT_POST_DB,
- NULL, NULL);
+ status = dhcp_context_create(DHCP_CONTEXT_PRE_DB | DHCP_CONTEXT_POST_DB
+ | DHCP_DNS_CLIENT_LAZY_INIT, NULL, NULL);
if (status != ISC_R_SUCCESS)
log_fatal("Can't initialize context: %s",
isc_result_totext(status));