From 7ff459af1369b9b83faa7daef36d4913670c7355 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Fri, 20 Apr 2018 14:15:34 +0000 Subject: [PATCH] - Fix #4091: Fix that reload of auth-zone does not merge the zonefile with the previous contents. git-svn-id: file:///svn/unbound/trunk@4641 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 2 ++ services/authzone.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/doc/Changelog b/doc/Changelog index 950390980..452e4d31b 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,8 @@ 20 April 2018: Wouter - man page documentation for dns-over-tls forward-addr '#' notation. - removed free from failed parse case. + - Fix #4091: Fix that reload of auth-zone does not merge the zonefile + with the previous contents. 19 April 2018: Wouter - Can set tls authentication with forward-addr: IP#tls.auth.name diff --git a/services/authzone.c b/services/authzone.c index a7141a1ef..56c4065a4 100644 --- a/services/authzone.c +++ b/services/authzone.c @@ -1560,6 +1560,11 @@ auth_zone_read_zonefile(struct auth_zone* z) free(n); return 0; } + + /* clear the data tree */ + traverse_postorder(&z->data, auth_data_del, NULL); + rbtree_init(&z->data, &auth_data_cmp); + memset(&state, 0, sizeof(state)); /* default TTL to 3600 */ state.default_ttl = 3600;