From 83c712ca609d3c821e74500ad9f1ff02172e54d1 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Mon, 13 Dec 2021 10:00:53 +0100 Subject: [PATCH] - Fix to pick up other class local zone information before unlock. --- doc/Changelog | 3 +++ services/localzone.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/Changelog b/doc/Changelog index 9df23b322..b6038612b 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +13 December 2021: Wouter + - Fix to pick up other class local zone information before unlock. + 10 December 2021: George - Allow local-data for classes other than IN to inherit a configured local-zone's type if possible, instead of defaulting to type diff --git a/services/localzone.c b/services/localzone.c index beaefbdc8..3e3a71aea 100644 --- a/services/localzone.c +++ b/services/localzone.c @@ -1057,6 +1057,9 @@ lz_setup_implicit(struct local_zones* zones, struct config_file* cfg) rr_name, len, labs, LDNS_RR_CLASS_IN, rr_type); if(z) { uint8_t* name = memdup(z->name, z->namelen); + size_t znamelen = z->namelen; + int znamelabs = z->namelabs; + enum localzone_type ztype = z->type; lock_rw_unlock(&zones->lock); if(!name) { log_err("out of memory"); @@ -1068,8 +1071,8 @@ lz_setup_implicit(struct local_zones* zones, struct config_file* cfg) z = #endif lz_enter_zone_dname(zones, name, - z->namelen, z->namelabs, - z->type, rr_class))) { + znamelen, znamelabs, + ztype, rr_class))) { free(rr_name); return 0; }