- Fix lock test protect for auth zone change.

- Fix to lock shared_ports structure during initialisation.
- Fix to lock anchor structure when file is set for it in
This commit is contained in:
W.C.A. Wijngaards
2026-07-24 12:13:09 +02:00
parent e1e646c6fc
commit e597711824
4 changed files with 19 additions and 2 deletions
+4
View File
@@ -13,6 +13,10 @@
- Fix to use sha256 for unbound-anchor unit test.
- Fix unbound-anchor check for return value of
X509_NAME_get_text_by_NID of the emailaddress.
- Fix lock test protect for auth zone change.
- Fix to lock shared_ports structure during initialisation.
- Fix to lock anchor structure when file is set for it in
parse of the header.
23 July 2026: Wouter
- Updated credits for Xuanchao Xie in 22 july changelog.
+6 -1
View File
@@ -438,7 +438,12 @@ auth_zone_create(struct auth_zones* az, uint8_t* nm, size_t nmlen,
rbtree_init(&z->data, &auth_data_cmp);
lock_rw_init(&z->lock);
lock_protect(&z->lock, &z->name, sizeof(*z)-sizeof(rbnode_type)-
sizeof(&z->rpz_az_next)-sizeof(&z->rpz_az_prev));
sizeof(z->rpz_az_next)-sizeof(z->rpz_az_prev)-
sizeof(z->max_transfer_size)-sizeof(z->max_transfer_size));
lock_protect(&z->lock, &z->max_transfer_size,
sizeof(z->max_transfer_size));
lock_protect(&z->lock, &z->max_transfer_time,
sizeof(z->max_transfer_time));
lock_rw_wrlock(&z->lock);
/* z lock protects all, except rbtree itself and the rpz linked list
* pointers, which are protected using az->lock */
+6 -1
View File
@@ -4154,16 +4154,21 @@ struct shared_ports* shared_ports_create(char** ifs, int num_ifs, int do_ip4,
return NULL;
}
lock_basic_init(&shp->lock);
lock_protect(&shp->lock, shp, sizeof(*shp));
lock_protect(&shp->lock, &shp->ip4_ifs, sizeof(shp->ip4_ifs));
lock_protect(&shp->lock, &shp->num_ip4, sizeof(shp->num_ip4));
lock_protect(&shp->lock, &shp->ip6_ifs, sizeof(shp->ip6_ifs));
lock_protect(&shp->lock, &shp->num_ip6, sizeof(shp->num_ip6));
#ifndef DISABLE_EXPLICIT_PORT_RANDOMISATION
/* Allocate interfaces */
lock_basic_lock(&shp->lock);
if(!shared_ports_alloc_ifs(shp, ifs, num_ifs, do_ip4, do_ip6,
availports, numavailports)) {
log_err("malloc failed");
shared_ports_delete(shp);
return NULL;
}
lock_basic_unlock(&shp->lock);
#else
(void)ifs; (void)num_ifs; (void)do_ip4; (void)do_ip6;
(void)availports; (void)numavailports;
+3
View File
@@ -884,13 +884,16 @@ parse_var_line(char* line, struct val_anchors* anchors,
*header_seen = 1;
*anchor = parse_id(anchors, line+6);
if(!*anchor) return -1;
lock_basic_lock(&(*anchor)->lock);
if(*anchor && !(*anchor)->autr->file) {
(*anchor)->autr->file = strdup(nm);
if(!(*anchor)->autr->file) {
lock_basic_unlock(&(*anchor)->lock);
log_err("malloc failure");
return -1;
}
}
lock_basic_unlock(&(*anchor)->lock);
if(*anchor) return 1;
} else if(strncmp(line, ";;REVOKED", 9) == 0) {
if(tp) {