1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

(send_dg): Don't just ignore the result we got in case we only receive one reply in single-request mode.

This commit is contained in:
Ulrich Drepper
2009-04-16 20:29:33 +00:00
parent 733ca93a45
commit 74b3cf224e

View File

@@ -1048,9 +1048,7 @@ send_dg(res_state statp,
} }
if (n == 0) { if (n == 0) {
Dprint(statp->options & RES_DEBUG, (stdout, ";; timeout\n")); Dprint(statp->options & RES_DEBUG, (stdout, ";; timeout\n"));
if (!single_request if (resplen > 1 && (recvresp1 || (buf2 != NULL && recvresp2)))
&& resplen > 1
&& (recvresp1 || (buf2 != NULL && recvresp2)))
{ {
/* There are quite a few broken name servers out /* There are quite a few broken name servers out
there which don't handle two outstanding there which don't handle two outstanding
@@ -1059,9 +1057,15 @@ send_dg(res_state statp,
having received one answer switch to the mode having received one answer switch to the mode
where we send the second request only once we where we send the second request only once we
have received the first answer. */ have received the first answer. */
single_request = true; if (!single_request)
*gotsomewhere = save_gotsomewhere; {
goto retry; single_request = true;
*gotsomewhere = save_gotsomewhere;
goto retry;
}
*resplen2 = 1;
return resplen;
} }
*gotsomewhere = 1; *gotsomewhere = 1;