]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix to pick up other class local zone information before unlock.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 13 Dec 2021 09:00:53 +0000 (10:00 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 13 Dec 2021 09:00:53 +0000 (10:00 +0100)
doc/Changelog
services/localzone.c

index 9df23b322d3f111db909993336c7360d132bafd9..b6038612ba9e322b6b97c10c73dc46054452a3a3 100644 (file)
@@ -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
index beaefbdc83d8c09f21a34cac71c49eb46aff57bf..3e3a71aea3c550cade50a5de46d9b9dadcc7e398 100644 (file)
@@ -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;
                                }