From 52aff65e35148d007fd2b832e9f6c6c5d9a6c55f Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Mon, 22 Apr 2024 13:44:42 +0200 Subject: [PATCH] - Fix edns subnet to sort rrset references when storing messages in the cache. This fixes a race condition in the rrset locks. --- doc/Changelog | 2 ++ edns-subnet/subnetmod.c | 1 + 2 files changed, 3 insertions(+) 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) -- 2.47.3