From c8d4fd89265d8a574eea84f084f594b9eb6f8569 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Fri, 21 Jan 2000 22:36:59 +0000 Subject: [PATCH] support setting the TSIG keys more than once --- lib/dns/view.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/dns/view.c b/lib/dns/view.c index 0745446788..27459ee221 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -360,15 +360,13 @@ dns_view_sethints(dns_view_t *view, dns_db_t *hints) { void 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(view->statickeys == NULL); REQUIRE(ring != NULL); - + if (view->statickeys != NULL) + dns_tsig_destroy(&view->statickeys); view->statickeys = ring; }