Skip to content

Commit

Permalink
* resolv/res_send.c (send_dg): If we already have one of two
Browse files Browse the repository at this point in the history
	answers and the server reports SERVFAI, NOTIMP, or REFUSED, then
	use the one answer insted of failing.
  • Loading branch information
Ulrich Drepper committed May 24, 2008
1 parent acbb987 commit e200388
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2008-05-24 Ulrich Drepper <drepper@redhat.com>

* resolv/res_send.c (send_dg): If we already have one of two
answers and the server reports SERVFAI, NOTIMP, or REFUSED, then
use the one answer insted of failing.

2008-02-20 Ryan S. Arnold <rsa@us.ibm.com>

* math/libm-test.inc (exp_test): Exclude expl(1000.0L) from
Expand Down
30 changes: 24 additions & 6 deletions resolv/res_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,12 +1001,12 @@ send_dg(res_state statp,
need_recompute = 1;
}
if (n == 0) {
Dprint(statp->options & RES_DEBUG, (stdout,
";; timeout sending\n"));
if (recvresp1)
return resplen;
if (buf2 != NULL && recvresp2)
return 1;
Dprint(statp->options & RES_DEBUG, (stdout, ";; timeout\n"));
if (recvresp1 || (buf2 != NULL && recvresp2))
{
*resplen2 = 1;
return resplen;
}

*gotsomewhere = 1;
return (0);
Expand Down Expand Up @@ -1184,6 +1184,24 @@ send_dg(res_state statp,
thisansp,
(*thisresplen > *thisanssiz)
? *thisanssiz : *thisresplen);

if (recvresp1 || (buf2 != NULL && recvresp2))
{
*resplen2 = 1;
return resplen;
}
if (buf2 != NULL)
{
/* We are waiting for a possible second reply. */
resplen = 1;
if (hp->id == anhp->id)
recvresp1 = 1;
else
recvresp2 = 1;

goto wait;
}

next_ns:
__res_iclose(statp, false);
/* don't retry if called from dig */
Expand Down

0 comments on commit e200388

Please sign in to comment.