From: Yu Watanabe Date: Fri, 6 May 2022 16:01:43 +0000 (+0900) Subject: resolve: move the RRSIG after the all corresponding entries X-Git-Tag: v251-rc3~10^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=388c92ce09fd2362422af94f1bb95f84f4005fa5;p=thirdparty%2Fsystemd.git resolve: move the RRSIG after the all corresponding entries Fixes #22002. --- diff --git a/src/resolve/resolved-dns-answer.c b/src/resolve/resolved-dns-answer.c index 54cc15b6315..96ae9bc0057 100644 --- a/src/resolve/resolved-dns-answer.c +++ b/src/resolve/resolved-dns-answer.c @@ -205,6 +205,12 @@ int dns_answer_add( } exist->flags |= flags; + + if (rr->key->type == DNS_TYPE_RRSIG) { + /* If the rr is RRSIG, then move the rr to the end. */ + assert_se(ordered_set_remove(a->items, exist) == exist); + assert_se(ordered_set_put(a->items, exist) == 1); + } return 0; }