shithub: riscv

Download patch

ref: 910082bedbeebeed079bfab2959b9ea6c1fb8e92
parent: 6db18e8784b845cfda99b7f8dab8a158aec6a26f
author: cinap_lenrek <[email protected]>
date: Sun Jan 28 12:46:19 EST 2024

ndb/dns: give each DoT server Maxtcpdialtm + 500ms to complete request

--- a/sys/src/cmd/ndb/dnresolve.c
+++ b/sys/src/cmd/ndb/dnresolve.c
@@ -1312,8 +1312,10 @@
 	n = 0;
 	n = serveraddrs(qp, dest, n, Ta);
 	n = serveraddrs(qp, dest, n, Taaaa);
-	endms = nowms + 500;
 	for(p = dest; p < dest+n; p++){
+		endms = timems() + Maxtcpdialtm + 500;
+		if(endms > qp->req->aborttime)
+			endms = qp->req->aborttime;
 		if(tcpquery(qp, pkt, len, p, endms, &m, 1) == 0){
 			/* free or incorporate RRs in m */
 			rv = procansw(qp, p, &m);