diff --git a/man/3proxy.cfg.5 b/man/3proxy.cfg.5 index 449a4dc..2f23a4e 100644 --- a/man/3proxy.cfg.5 +++ b/man/3proxy.cfg.5 @@ -517,7 +517,9 @@ Use \fBauthcache\fR to speedup authentication. RADIUS feature is currently exper .br Nameserver to use for name resolutions. If none specified system routines for name resolution is -used. Optional port number may be specified. +used. A server that answers with an error (FORMERR, SERVFAIL, REFUSED +and the like) is passed over for the next one, while a name answered +with no data, or as not there, ends the search. Optional port number may be specified. If optional /tcp is added to IP address, name resolution is performed over TCP. An IPv6 address has to be enclosed in square brackets: diff --git a/src/resolve.c b/src/resolve.c index c7991e6..b6cfd6d 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -156,7 +156,13 @@ uint32_t udpresolve(int af, unsigned char * name, unsigned char * value, uint32_ 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