diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-07-08 06:49:08 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-07-08 06:49:08 +0000 |
commit | 359bb2ef12afbd059eadbed49a8919fd0dedde4f (patch) | |
tree | 07db02a55fc807c77d4d3538550da7b4e32bd425 /resolv/res_send.c | |
parent | 6aeeeb9a09502599dc170f740fb7d1ec46cdb798 (diff) | |
download | glibc-359bb2ef12afbd059eadbed49a8919fd0dedde4f.zip glibc-359bb2ef12afbd059eadbed49a8919fd0dedde4f.tar.gz glibc-359bb2ef12afbd059eadbed49a8919fd0dedde4f.tar.bz2 |
(send_dg): Recognize referral results and treat them as server errors.
Diffstat (limited to 'resolv/res_send.c')
-rw-r--r-- | resolv/res_send.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/resolv/res_send.c b/resolv/res_send.c index 1a53e5b..6f12b88 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -1008,11 +1008,19 @@ send_dg(res_state statp, DprintQ(statp->options & RES_DEBUG, (stdout, "server rejected query:\n"), ans, (resplen > anssiz) ? anssiz : resplen); + next_ns: res_nclose(statp); /* don't retry if called from dig */ if (!statp->pfcode) return (0); } + if (anhp->rcode == NOERROR && anhp->ancount == 0 + && anhp->aa == 0 && anhp->ra == 0 && anhp->arcount == 0) { + DprintQ(statp->options & RES_DEBUG, + (stdout, "referred query:\n"), + ans, (resplen > anssiz) ? anssiz : resplen); + goto next_ns; + } if (!(statp->options & RES_IGNTC) && anhp->tc) { /* * To get the rest of answer, |