shithub: riscv

Download patch

ref: 9911557e45d5763320eb612aa6c5965f8ff39007
parent: aa8af9c5a32b5f3afe0e612981fe4d9fada43d34
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Dec 10 10:37:12 EST 2022

ndb/dns: don't try to resolve local dns servers

We should have found the ip addresses of our local dns servers
from the cache or the database. Also, the rr->host is
an ip address string and not a valid domain name so the
query there makes no sense.

--- a/sys/src/cmd/ndb/dnresolve.c
+++ b/sys/src/cmd/ndb/dnresolve.c
@@ -802,6 +802,8 @@
 			if(rp->marker & mark)
 				continue;
 			rp->marker |= mark;
+			if(strncmp(rp->owner->name, "local#", 6) == 0)
+				continue;
 			arp = dnresolve(rp->host->name, Cin, type, qp->req, 0,
 				depth+1, Recurse, 1, 0);
 			rrfreelist(rrremneg(&arp));