diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-12 16:45:49 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-12 17:15:51 +0200 |
commit | 1117a96087b18023727192574a7d43be9344fc23 (patch) | |
tree | a9913310daea6eea9ba8a32895770b81e81b192e /src/resolve/resolved-dns-transaction.c | |
parent | 14b71de4e143500cf872ef1ca2e2653cc941302b (diff) | |
download | systemd-1117a96087b18023727192574a7d43be9344fc23.tar.gz |
resolved: add DNS_ANSWER_REPLACE
C.f. ce913e0ec4c97651c7c1509b72fb81ee61d80c6a.
Diffstat (limited to 'src/resolve/resolved-dns-transaction.c')
-rw-r--r-- | src/resolve/resolved-dns-transaction.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index fc90955142..55626d06e3 100644 --- a/src/resolve/resolved-dns-transaction.c +++ b/src/resolve/resolved-dns-transaction.c @@ -1364,8 +1364,7 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p, bool encrypt * field is later replaced by the DNSSEC validated subset. The 'answer_auxiliary' field carries the * original complete record set, including RRSIG and friends. We use this when passing data to * clients that ask for DNSSEC metadata. */ - dns_answer_unref(t->answer); - t->answer = dns_answer_ref(p->answer); + DNS_ANSWER_REPLACE(t->answer, dns_answer_ref(p->answer)); t->answer_rcode = DNS_PACKET_RCODE(p); t->answer_dnssec_result = _DNSSEC_RESULT_INVALID; SET_FLAG(t->answer_query_flags, SD_RESOLVED_AUTHENTICATED, false); @@ -3452,8 +3451,7 @@ int dns_transaction_validate_dnssec(DnsTransaction *t) { break; } - dns_answer_unref(t->answer); - t->answer = TAKE_PTR(validated); + DNS_ANSWER_REPLACE(t->answer, TAKE_PTR(validated)); /* At this point the answer only contains validated * RRsets. Now, let's see if it actually answers the question |