From ca22af89996483efd820de0084c964fc336ee7c1 Mon Sep 17 00:00:00 2001 From: Thomas Markwalder Date: Mon, 19 Jun 2017 14:44:29 -0400 Subject: [master] Optimized if and when DNS client context and ports are initted Merges in rt45290. --- client/dhclient.8 | 5 +++-- client/dhclient.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'client') 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)); -- cgit v1.2.1