diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-03-15 22:15:18 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-03-15 23:54:53 +0100 |
commit | a7c0291c104cdd9d5ae2fe3c5855273bbadae13e (patch) | |
tree | 0ee42399401a59c65ce0ef9a5fd1b5f2efc10fa5 /src/resolve/resolved-dns-stub.c | |
parent | 1414b67e0d9515c23221cecbb5323d45ea2020b1 (diff) | |
download | systemd-a7c0291c104cdd9d5ae2fe3c5855273bbadae13e.tar.gz |
resolved: match CNAME replies to right question
Previously by mistake we'd always match every single reply we get in a
CNAME chain to the original question from the stub client. That's
broken, we need to test it against the CNAME query we are currently
looking at.
The effect of this incorrect matching was that we'd assign the RRs to
the wrong section since we'd assume they'd be auxiliary answers instead
of primary answers.
Fixes: #18972
Diffstat (limited to 'src/resolve/resolved-dns-stub.c')
-rw-r--r-- | src/resolve/resolved-dns-stub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-stub.c b/src/resolve/resolved-dns-stub.c index f8d4767e53..b6d14b9305 100644 --- a/src/resolve/resolved-dns-stub.c +++ b/src/resolve/resolved-dns-stub.c @@ -761,7 +761,7 @@ static void dns_stub_query_complete(DnsQuery *q) { * and keep adding all RRs in the CNAME chain. */ r = dns_stub_assign_sections( q, - q->request_packet->question, + dns_query_question_for_protocol(q, DNS_PROTOCOL_DNS), dns_stub_reply_with_edns0_do(q)); if (r < 0) { log_debug_errno(r, "Failed to assign sections: %m"); |