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

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

Snap for 10632790 from 228f7767 to mainline-healthfitness-release

Change-Id: Ic50b51f26d12a92540e85b84ff229edbff2c4574
parents 3c381b25 228f7767
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -229,7 +229,6 @@ cc_library {
        "libmodules-utils-build",
        "libprotobuf-cpp-lite",
        "libstatslog_resolv",
        "libstatspush_compat",
        "libsysutils",
        "netd_event_listener_interface-lateststable-ndk",
        "server_configurable_flags",
@@ -292,7 +291,7 @@ genrule {
    name: "statslog_resolv.h",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_resolv.h --module resolv" +
        " --namespace android,net,stats --minApiLevel 29",
        " --namespace android,net,stats --minApiLevel 30",
    out: [
        "statslog_resolv.h",
    ],
@@ -302,7 +301,7 @@ genrule {
    name: "statslog_resolv.cpp",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_resolv.cpp --module resolv" +
        " --namespace android,net,stats --importHeader statslog_resolv.h --minApiLevel 29",
        " --namespace android,net,stats --importHeader statslog_resolv.h --minApiLevel 30",
    out: [
        "statslog_resolv.cpp",
    ],
@@ -316,10 +315,9 @@ cc_library_static {
    export_generated_headers: ["statslog_resolv.h"],
    static_libs: [
        "libcutils",
        "libstatspush_compat",
    ],
    header_libs: [
        "libgtest_prod_headers", // Used by libstatspush_compat
    shared_libs: [
        "libstatssocket",
    ],
    apex_available: ["com.android.resolv"],
    min_sdk_version: "30",
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <netinet/in.h>
#include <condition_variable>
#include <cstdlib>
#include <functional>
#include <mutex>
#include <unordered_map>

+3 −3
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ std::list<DnsTlsServer> DnsTlsDispatcher::getOrderedAndUsableServerList(
                if (!xport->usable()) {
                    // Don't use this xport. It will be removed after timeout
                    // (IDLE_TIMEOUT minutes).
                    LOG(DEBUG) << "Skip using DoT server " << tlsServer.toIpString() << " on "
                    LOG(DEBUG) << "Skip using DoT server " << tlsServer.toString() << " on "
                               << netId;
                    continue;
                }
@@ -231,7 +231,7 @@ DnsTlsTransport::Response DnsTlsDispatcher::query(const DnsTlsServer& server, un
            // a new xport will be created.
            const auto result = PrivateDnsConfiguration::getInstance().requestDotValidation(
                    netId, PrivateDnsConfiguration::ServerIdentity{server}, mark);
            LOG(WARNING) << "Requested validation for " << server.toIpString() << " with mark 0x"
            LOG(WARNING) << "Requested validation for " << server.toString() << " with mark 0x"
                         << std::hex << mark << ", "
                         << (result.ok() ? "succeeded" : "failed: " + result.error().message());
        }
@@ -327,7 +327,7 @@ DnsTlsDispatcher::Transport* DnsTlsDispatcher::addTransport(const DnsTlsServer&
    ret = new Transport(server, mark, netId, mFactory.get(), triggerThr, unusableThr, queryTimeout);
    LOG(INFO) << "Transport is initialized with { " << triggerThr << ", " << unusableThr << ", "
              << queryTimeout << "ms }"
              << " for server { " << server.toIpString() << "/" << server.name << " }";
              << " for server " << server.toString();

    mStore[key].reset(ret);

+5 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

#include <algorithm>

#include <android-base/format.h>
#include <netdutils/InternetAddresses.h>

namespace {
@@ -130,5 +131,9 @@ std::string DnsTlsServer::toIpString() const {
    return netdutils::IPSockAddr::toIPSockAddr(ss).ip().toString();
}

std::string DnsTlsServer::toString() const {
    return fmt::format("{{{}/{}}}", toIpString(), name);
}

}  // namespace net
}  // namespace android
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ struct DnsTlsServer {

    bool wasExplicitlyConfigured() const;
    std::string toIpString() const;
    std::string toString() const;

    std::string provider() const { return name; }
    netdutils::IPSockAddr addr() const { return netdutils::IPSockAddr::toIPSockAddr(ss); }
Loading