resolved: fix how we detect whether auxiliary DNSSEC transactions are ready
authorLennart Poettering <lennart@poettering.net>
Mon, 18 Jan 2016 21:36:58 +0000 (22:36 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 18 Jan 2016 22:31:16 +0000 (23:31 +0100)
commit942eb2e71b0faba083e22f2e73b7ec544e7ac091
tree107615fd78e6552004f91f30e983286bb6c4360e
parent8ec76e6af5297fdcbbd89d8bec3a78ea045fd41a
resolved: fix how we detect whether auxiliary DNSSEC transactions are ready

Previously, when getting notified about a completed auxiliary DNSSEC transaction we'd immediately act on it, and
possibly abort the main transaction. This is problematic, as DNS transactions that already completed at the time we
started using them will never get the notification event, and hence never be acted on in the same way.

Hence, introduce a new call dns_transaction_dnssec_ready() that checks the state of auxiliary DNSSEC transactions, and
returns 1 when we are ready for the actual DNSSEC validation step. Then, make sure this is invoked when the auxiliary
transactions are first acquired (and thus possibly reused) as well when the notifications explained above take place.

This fixes problems particularly when doing combined A and AAAA lookups  where the auxiliary DNSSEC transactions get
reused between them, and where we got confused if we reused an auxiliary DNSSEC transaction from one when it already
got completed from the other.
src/resolve/resolved-dns-transaction.c