mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
resolve: a name server answering with an error asks the next one (#735)
A reply with no answers and an error code - FORMERR, SERVFAIL, NOTIMP, REFUSED - ended the resolution as if the name had no address, and the servers after the one that answered were never asked, so one broken server made every name it broke fail. Such an answer is passed over for the next server now; a reply without data, and one that says the name is not there, still end the search.
This commit is contained in:
1 parent
923b9c8abf
commit
da9d1ba892
3 files changed
+99
-2
No files matched your search
+7
-1
@@ -177,7 +177,13 @@ static uint32_t udpresolvec(struct extparam *c, int af, unsigned char * name, un
|
||||
continue; /* question does not match the query */
|
||||
}
|
||||
if((na = buf[7] + (((unsigned short)buf[6])<<8)) < 1) {
|
||||
return 0;
|
||||
switch(buf[3] & 0x0F){
|
||||
case 0: /* the name has no address */
|
||||
case 3: /* the name is not there */
|
||||
return 0;
|
||||
default: /* the server failed: ask the next one */
|
||||
continue;
|
||||
}
|
||||
}
|
||||
for(k = 13; k<len && buf[k]; k++) {
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user