summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2015-05-10 23:13:41 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2015-05-11 00:37:24 +0100
commit8241d8dda54bd5680b6fd8ef16108c0309a5ade7 (patch)
tree03514818515fe991a48b6c55799866996f4dbc12 /src
parent99a0dc9358699cbe049cdd97874b17c263174f86 (diff)
Do not use the A lookup following an AAAA for setting the FQDN. Bug 1588
Normally benign, it bites when the pair was led to by a CNAME; modern usage is to not canoicalize the domain to a cname target (and we were inconsistent anyway for A-only vs AAAA+A).
Diffstat (limited to 'src')
-rw-r--r--src/src/host.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/src/host.c b/src/src/host.c
index 45ec13659..206751757 100644
--- a/src/src/host.c
+++ b/src/src/host.c
@@ -2380,7 +2380,10 @@ for (; i >= 0; i--)
/* Lookup succeeded: fill in the given host item with the first non-ignored
address found; create additional items for any others. A single A6 record
- may generate more than one address. */
+ may generate more than one address. The lookup had a chance to update the
+ fqdn; we do not want any later times round the loop to do so. */
+
+ fully_qualified_name = NULL;
for (rr = dns_next_rr(&dnsa, &dnss, RESET_ANSWERS);
rr != NULL;