fixed bug that caused outdated IPsto be returned from cache; added test for that
[pingcheck] / src / dns / dnscache.cpp
index 2796a07..7f48183 100644 (file)
@@ -318,7 +318,7 @@ HostAddressVec DnsCache::get_ips_recursive(const std::string &hostname,
 {
     std::string current_host = hostname;
     Cname current_cname;
-    HostAddressVec result = get_ips(current_host);
+    HostAddressVec result = get_ips(current_host, check_up_to_date);
     int n_recursions = 0;
     uint32_t min_cname_ttl = 0xffff;   // largest possible unsigned 4-byte value
     while ( result.empty() )