shithub: riscv

Download patch

ref: e76452a69f80ef0a3d3d9a719a725371b5e6beca
parent: 1d0f8a7e512e5abfea9c5d2fdf2fb4c05efc720b
parent: a66be233961cc2277a8b3ab4e386497db9933970
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Nov 5 23:33:29 EST 2018

merge

--- a/sys/src/cmd/ndb/dnstcp.c
+++ b/sys/src/cmd/ndb/dnstcp.c
@@ -256,6 +256,7 @@
 {
 	uchar ip[IPaddrlen];
 	RR *list, *rp;
+	int tmp;
 
 	for(; servers != nil; servers = servers->next){
 		if(strcmp(ipattr(servers->name), "ip") == 0){
@@ -265,8 +266,13 @@
 				return servers;
 			continue;
 		}
+
+		tmp = cfg.resolver;
+		cfg.resolver = 1;
 		list = dnresolve(servers->name, Cin, isv4(srcip)? Ta: Taaaa,
 			req, nil, 0, Recurse, 0, nil);
+		cfg.resolver = tmp;
+
 		for(rp = list; rp != nil; rp = rp->next){
 			if(parseip(ip, rp->ip->name) == -1)
 				continue;