diff options
author | Thomas Markwalder <tmark@isc.org> | 2017-06-19 14:44:29 -0400 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2017-06-19 14:44:29 -0400 |
commit | ca22af89996483efd820de0084c964fc336ee7c1 (patch) | |
tree | 678b882c7e3c70bc1db5a746a187816f858b4296 /server/dhcpd.c | |
parent | 24f10d6d9c05e975b279656d2bee927d98902095 (diff) | |
download | isc-dhcp-ca22af89996483efd820de0084c964fc336ee7c1.tar.gz |
[master] Optimized if and when DNS client context and ports are initted
Merges in rt45290.
Diffstat (limited to 'server/dhcpd.c')
-rw-r--r-- | server/dhcpd.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/server/dhcpd.c b/server/dhcpd.c index 910f374f..ce33587c 100644 --- a/server/dhcpd.c +++ b/server/dhcpd.c @@ -1253,10 +1253,16 @@ void postconf_initialization (int quiet) } } - if (dhcp_context_create(DHCP_CONTEXT_POST_DB, local4_ptr, local6_ptr) - != ISC_R_SUCCESS) - log_fatal("Unable to complete ddns initialization"); - + /* Don't init DNS client if update style is none. This avoids + * listening ports that aren't needed. We don't use ddns-udpates + * as that has multiple levels of scope. */ + if (ddns_update_style != DDNS_UPDATE_STYLE_NONE) { + if (dhcp_context_create(DHCP_CONTEXT_POST_DB, + local4_ptr, local6_ptr) + != ISC_R_SUCCESS) { + log_fatal("Unable to complete ddns initialization"); + } + } #else /* If we don't have support for updates compiled in tell the user */ if (ddns_update_style != DDNS_UPDATE_STYLE_NONE) { |