mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
TSIG initialization moved until after config file parsing
This commit is contained in:
parent
e552b98037
commit
24e49b2133
@ -274,11 +274,6 @@ setup() {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
ns_main_earlyfatal("ns_server_init() failed: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
result = dns_tsig_init(ns_g_mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
ns_main_earlyfatal("dns_tsig_init() failed: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include <dns/journal.h>
|
||||
#include <dns/view.h>
|
||||
#include <dns/zone.h>
|
||||
#include <dns/tsig.h>
|
||||
#include <dns/tkey.h>
|
||||
|
||||
#include <named/types.h>
|
||||
@ -360,13 +361,23 @@ load_configuration(const char *filename) {
|
||||
if (oconfigctx != NULL)
|
||||
dns_c_ctx_delete(ns_g_lctx, &oconfigctx);
|
||||
|
||||
/*
|
||||
* Load the TSIG information from the configuration
|
||||
*/
|
||||
result = dns_tsig_init(ns_g_confctx, ns_g_mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
ns_server_fatal(NS_LOGMODULE_SERVER, ISC_FALSE,
|
||||
"dns_tsig_init() failed: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
/*
|
||||
* Load the TKEY information from the configuration
|
||||
*/
|
||||
result = dns_tkey_init(ns_g_lctx, ns_g_confctx, ns_g_mctx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
ns_server_fatal(NS_LOGMODULE_SERVER, ISC_FALSE,
|
||||
"TKEY init failed");
|
||||
"dns_tkey_init() failed: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user