From: Mark Wooding Date: Tue, 10 Jun 2014 23:40:42 +0000 (+0100) Subject: src/types.c: Handle inconsistent CNAME records between addr answers. X-Git-Tag: wip.ipv6.2014-10-13.compare-new~1 X-Git-Url: https://git.distorted.org.uk/~mdw/adns/commitdiff_plain/c4cb1794b6d9e70b8f265c11e1a09d7ebcba30b7?hp=c4cb1794b6d9e70b8f265c11e1a09d7ebcba30b7 src/types.c: Handle inconsistent CNAME records between addr answers. It can happen, if we have multiple address queries outstanding, that they disagree about whether the original name has a CNAME record, or what the CNAME target is. This needn't be a configuration error or a server bug: the zone might have been caught during a changeover. So we should try to handle this situation gracefully. We resolve this as follows. At least one answer must have reported a CNAME record, else there is no ambiguity. We choose the first such record to arrive, and commit to it, discarding other addresses already received, if any. We then resubmit address queries for the address types still outstanding, but asking specifically for the CNAME target rather than the original name. Signed-off-by: Mark Wooding ---