Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b36500a authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7660651 from 9eb53019 to mainline-tethering-release

Change-Id: I987379856eb1ca023250a83b1f8ef00496c27546
parents 793b8ab9 9eb53019
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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.
+6 −1
Original line number Diff line number Diff line
@@ -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";
+3 −0
Original line number Diff line number Diff line
@@ -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;
+0 −2
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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);
}

@@ -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