]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix edns subnet to sort rrset references when storing messages
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 22 Apr 2024 11:44:42 +0000 (13:44 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 22 Apr 2024 11:44:42 +0000 (13:44 +0200)
  in the cache. This fixes a race condition in the rrset locks.

doc/Changelog
edns-subnet/subnetmod.c

index fd9d340fb2ee2f413ab7b30d823c193cf7a1fe68..68316618a279a0edc2caf16f5017bc8e60685b7f 100644 (file)
@@ -1,5 +1,7 @@
 22 April 2024: Wouter
        - Add checklock feature verbose_locking to trace locks and unlocks.
+       - Fix edns subnet to sort rrset references when storing messages
+         in the cache. This fixes a race condition in the rrset locks.
 
 15 April 2024: Wouter
        - Fix #1048: Update ax_pkg_swig.m4 and ax_pthread.m4.
index 22e3ef17ec0119d42dbbfccce4531fcd8dcfe846..6cd40231fac72a3bee31992461486d9c6656ad4b 100644 (file)
@@ -421,6 +421,7 @@ update_cache(struct module_qstate *qstate, int id)
                rep->ref[i].id = rep->rrsets[i]->id;
        }
        reply_info_set_ttls(rep, *qstate->env->now);
+       reply_info_sortref(rep);
        rep->flags |= (BIT_RA | BIT_QR); /* fix flags to be sensible for */
        rep->flags &= ~(BIT_AA | BIT_CD);/* a reply based on the cache   */
        if(edns->subnet_source_mask == 0 && edns->subnet_scope_mask == 0)