mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-04 00:25:29 +00:00
support setting the TSIG keys more than once
This commit is contained in:
@@ -360,15 +360,13 @@ dns_view_sethints(dns_view_t *view, dns_db_t *hints) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
dns_view_setkeyring(dns_view_t *view, dns_tsig_keyring_t *ring) {
|
dns_view_setkeyring(dns_view_t *view, dns_tsig_keyring_t *ring) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the view's static TSIG keyring
|
* Set the view's static TSIG keyring.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
REQUIRE(DNS_VIEW_VALID(view));
|
REQUIRE(DNS_VIEW_VALID(view));
|
||||||
REQUIRE(view->statickeys == NULL);
|
|
||||||
REQUIRE(ring != NULL);
|
REQUIRE(ring != NULL);
|
||||||
|
if (view->statickeys != NULL)
|
||||||
|
dns_tsig_destroy(&view->statickeys);
|
||||||
view->statickeys = ring;
|
view->statickeys = ring;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user