jcs
/wallops
/amendments
/114
dnr: Consider a result of 0.0.0.0 a bad one
jcs made amendment 114 2 months ago
--- dnr.c Fri Aug 30 09:54:55 2024
+++ dnr.c Tue Sep 17 15:50:32 2024
@@ -256,7 +256,11 @@ DNSResolveName(char *name, unsigned long *ipAddress, v
SystemTask();
}
}
-
+
+ if (aHostInfo.rtnCode == cacheFault && aHostInfo.addr[0] == 0)
+ /* consider 0.0.0.0 a bad answer */
+ aHostInfo.rtnCode = authNameErr;
+
if ((aHostInfo.rtnCode == noErr) || (aHostInfo.rtnCode == cacheFault)) {
/* use the first IP address for this host */
*ipAddress = aHostInfo.addr[0];