diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-05-07 01:01:43 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-05-07 15:14:41 +0900 |
commit | 388c92ce09fd2362422af94f1bb95f84f4005fa5 (patch) | |
tree | e37f0bd54cb13e6069f2466c6e8ec282e0f81433 | |
parent | 71aee23dba7faeef68e7232f444626267a6c90d7 (diff) | |
download | systemd-388c92ce09fd2362422af94f1bb95f84f4005fa5.tar.gz |
resolve: move the RRSIG after the all corresponding entries
Fixes #22002.
-rw-r--r-- | src/resolve/resolved-dns-answer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-answer.c b/src/resolve/resolved-dns-answer.c index 54cc15b631..96ae9bc005 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; } |