mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +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)
|
if (result != ISC_R_SUCCESS)
|
||||||
ns_main_earlyfatal("ns_server_init() failed: %s",
|
ns_main_earlyfatal("ns_server_init() failed: %s",
|
||||||
isc_result_totext(result));
|
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
|
static void
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
#include <dns/journal.h>
|
#include <dns/journal.h>
|
||||||
#include <dns/view.h>
|
#include <dns/view.h>
|
||||||
#include <dns/zone.h>
|
#include <dns/zone.h>
|
||||||
|
#include <dns/tsig.h>
|
||||||
#include <dns/tkey.h>
|
#include <dns/tkey.h>
|
||||||
|
|
||||||
#include <named/types.h>
|
#include <named/types.h>
|
||||||
@ -360,13 +361,23 @@ load_configuration(const char *filename) {
|
|||||||
if (oconfigctx != NULL)
|
if (oconfigctx != NULL)
|
||||||
dns_c_ctx_delete(ns_g_lctx, &oconfigctx);
|
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
|
* Load the TKEY information from the configuration
|
||||||
*/
|
*/
|
||||||
result = dns_tkey_init(ns_g_lctx, ns_g_confctx, ns_g_mctx);
|
result = dns_tkey_init(ns_g_lctx, ns_g_confctx, ns_g_mctx);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
ns_server_fatal(NS_LOGMODULE_SERVER, ISC_FALSE,
|
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