summaryrefslogtreecommitdiff
path: root/src/network/lookup_name.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/lookup_name.c')
-rw-r--r--src/network/lookup_name.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/lookup_name.c b/src/network/lookup_name.c
index aa558c19..bec6ba22 100644
--- a/src/network/lookup_name.c
+++ b/src/network/lookup_name.c
@@ -153,8 +153,11 @@ static int name_from_dns(struct address buf[static MAXADDRS], char canon[static
qlens[nq] = __res_mkquery(0, name, 1, afrr[i].rr,
0, 0, 0, qbuf[nq], sizeof *qbuf);
if (qlens[nq] == -1)
- return EAI_NONAME;
+ return 0;
qbuf[nq][3] = 0; /* don't need AD flag */
+ /* Ensure query IDs are distinct. */
+ if (nq && qbuf[nq][0] == qbuf[0][0])
+ qbuf[nq][0]++;
nq++;
}
}