Fix missing reverse-records from --dynamic-host.

Thanks to Sten Spans for spotting the bug.
This commit is contained in:
Simon Kelley
2022-02-18 20:53:56 +00:00
parent e426c2d3bc
commit f4c87b504b

View File

@@ -1597,7 +1597,7 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen,
if (addrlist) if (addrlist)
break; break;
else else if (!(intr->flags & INP4))
while (intr->next && strcmp(intr->intr, intr->next->intr) == 0) while (intr->next && strcmp(intr->intr, intr->next->intr) == 0)
intr = intr->next; intr = intr->next;
} }
@@ -1612,7 +1612,7 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen,
if (addrlist) if (addrlist)
break; break;
else else if (!(intr->flags & INP6))
while (intr->next && strcmp(intr->intr, intr->next->intr) == 0) while (intr->next && strcmp(intr->intr, intr->next->intr) == 0)
intr = intr->next; intr = intr->next;
} }