From: W.C.A. Wijngaards Date: Mon, 22 Apr 2024 11:44:42 +0000 (+0200) Subject: - Fix edns subnet to sort rrset references when storing messages X-Git-Tag: release-1.20.0rc1~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52aff65e35148d007fd2b832e9f6c6c5d9a6c55f;p=thirdparty%2Funbound.git - Fix edns subnet to sort rrset references when storing messages in the cache. This fixes a race condition in the rrset locks. --- diff --git a/doc/Changelog b/doc/Changelog index fd9d340fb..68316618a 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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. diff --git a/edns-subnet/subnetmod.c b/edns-subnet/subnetmod.c index 22e3ef17e..6cd40231f 100644 --- a/edns-subnet/subnetmod.c +++ b/edns-subnet/subnetmod.c @@ -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)