shithub: riscv

Download patch

ref: da6a10c417f16c26978b8db8c4fa0f35ac89ad73
parent: 82defc81526a80a2f03ae0333a9889cfd2404cb1
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Nov 26 17:31:23 EST 2013

ndb/dns: do dnresolve() loopcheck only on hosts that we havnt already tried

we might get a unreachable nameserver ip from a parent
nameserver. if the remaining set of nameservers does not
loop, we should try to resolve them.

so skip the loopcheck for nameservers already tried.

--- a/sys/src/cmd/ndb/dnresolve.c
+++ b/sys/src/cmd/ndb/dnresolve.c
@@ -814,6 +814,7 @@
 	 */
 	if(arp == 0){
 		for(rp = qp->nsrp; rp; rp = rp->next)
+			if(rp->marker == 0)
 			if(queryloops(qp, rp))
 				/*
 				 * give up as we should have got the address
--