Loading Experiments.h +2 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,8 @@ class Experiments { "dot_validation_latency_factor", "dot_validation_latency_offset_ms", "doh", "doh_query_timeout_ms", "doh_probe_timeout_ms", "mdns_resolution", }; // This value is used in updateInternal as the default value if any flags can't be found. Loading PrivateDnsConfiguration.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -462,8 +462,13 @@ int PrivateDnsConfiguration::setDoh(int32_t netId, uint32_t mark, mPrivateDnsLog.push(std::move(record)); LOG(INFO) << __func__ << ": Upgrading server to DoH: " << name; int probeTimeout = Experiments::getInstance()->getFlag("doh_probe_timeout_ms", kDohProbeDefaultTimeoutMs); if (probeTimeout < 1000) { probeTimeout = 1000; } return doh_net_new(mDohDispatcher, netId, dohId.httpsTemplate.c_str(), dohId.host.c_str(), dohId.ipAddr.c_str(), mark, caCert.c_str(), 3000); dohId.ipAddr.c_str(), mark, caCert.c_str(), probeTimeout); } LOG(INFO) << __func__ << ": No suitable DoH server found"; Loading PrivateDnsConfiguration.h +3 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,9 @@ struct PrivateDnsStatus { class PrivateDnsConfiguration { public: static constexpr int kDohQueryDefaultTimeoutMs = 30000; static constexpr int kDohProbeDefaultTimeoutMs = 60000; struct ServerIdentity { const netdutils::IPSockAddr sockaddr; const std::string provider; Loading ResolverController.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -294,8 +294,6 @@ void ResolverController::stopPrefix64Discovery(int32_t netId) { int ResolverController::getPrefix64(unsigned netId, netdutils::IPPrefix* prefix) { netdutils::IPPrefix p = mDns64Configuration.getPrefix64(netId); if (p.family() != AF_INET6 || p.length() == 0) { LOG(INFO) << "No valid NAT64 prefix (" << netId << ", " << p.toString().c_str() << ")"; return -ENOENT; } *prefix = p; Loading res_cache.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1199,7 +1199,7 @@ static void _cache_remove_oldest(Cache* cache) { return; } LOG(INFO) << __func__ << ": Cache full - removing oldest"; res_pquery(oldest->query, oldest->querylen); res_pquery({oldest->query, oldest->querylen}); _cache_remove_p(cache, lookup); } Loading Loading @@ -1304,7 +1304,7 @@ ResolvCacheStatus resolv_cache_lookup(unsigned netid, const void* query, int que /* remove stale entries here */ if (now >= e->expires) { LOG(INFO) << __func__ << ": NOT IN CACHE (STALE ENTRY " << *lookup << "DISCARDED)"; res_pquery(e->query, e->querylen); res_pquery({e->query, e->querylen}); _cache_remove_p(cache, lookup); return RESOLV_CACHE_NOTFOUND; } Loading Loading
Experiments.h +2 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,8 @@ class Experiments { "dot_validation_latency_factor", "dot_validation_latency_offset_ms", "doh", "doh_query_timeout_ms", "doh_probe_timeout_ms", "mdns_resolution", }; // This value is used in updateInternal as the default value if any flags can't be found. Loading
PrivateDnsConfiguration.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -462,8 +462,13 @@ int PrivateDnsConfiguration::setDoh(int32_t netId, uint32_t mark, mPrivateDnsLog.push(std::move(record)); LOG(INFO) << __func__ << ": Upgrading server to DoH: " << name; int probeTimeout = Experiments::getInstance()->getFlag("doh_probe_timeout_ms", kDohProbeDefaultTimeoutMs); if (probeTimeout < 1000) { probeTimeout = 1000; } return doh_net_new(mDohDispatcher, netId, dohId.httpsTemplate.c_str(), dohId.host.c_str(), dohId.ipAddr.c_str(), mark, caCert.c_str(), 3000); dohId.ipAddr.c_str(), mark, caCert.c_str(), probeTimeout); } LOG(INFO) << __func__ << ": No suitable DoH server found"; Loading
PrivateDnsConfiguration.h +3 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,9 @@ struct PrivateDnsStatus { class PrivateDnsConfiguration { public: static constexpr int kDohQueryDefaultTimeoutMs = 30000; static constexpr int kDohProbeDefaultTimeoutMs = 60000; struct ServerIdentity { const netdutils::IPSockAddr sockaddr; const std::string provider; Loading
ResolverController.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -294,8 +294,6 @@ void ResolverController::stopPrefix64Discovery(int32_t netId) { int ResolverController::getPrefix64(unsigned netId, netdutils::IPPrefix* prefix) { netdutils::IPPrefix p = mDns64Configuration.getPrefix64(netId); if (p.family() != AF_INET6 || p.length() == 0) { LOG(INFO) << "No valid NAT64 prefix (" << netId << ", " << p.toString().c_str() << ")"; return -ENOENT; } *prefix = p; Loading
res_cache.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1199,7 +1199,7 @@ static void _cache_remove_oldest(Cache* cache) { return; } LOG(INFO) << __func__ << ": Cache full - removing oldest"; res_pquery(oldest->query, oldest->querylen); res_pquery({oldest->query, oldest->querylen}); _cache_remove_p(cache, lookup); } Loading Loading @@ -1304,7 +1304,7 @@ ResolvCacheStatus resolv_cache_lookup(unsigned netid, const void* query, int que /* remove stale entries here */ if (now >= e->expires) { LOG(INFO) << __func__ << ": NOT IN CACHE (STALE ENTRY " << *lookup << "DISCARDED)"; res_pquery(e->query, e->querylen); res_pquery({e->query, e->querylen}); _cache_remove_p(cache, lookup); return RESOLV_CACHE_NOTFOUND; } Loading