Loading Android.bp +4 −6 Original line number Diff line number Diff line Loading @@ -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", Loading Loading @@ -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", ], Loading @@ -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", ], Loading @@ -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", Loading Dns64Configuration.h +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <netinet/in.h> #include <condition_variable> #include <cstdlib> #include <functional> #include <mutex> #include <unordered_map> Loading DnsTlsDispatcher.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading @@ -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()); } Loading Loading @@ -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); Loading DnsTlsServer.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <algorithm> #include <android-base/format.h> #include <netdutils/InternetAddresses.h> namespace { Loading Loading @@ -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 DnsTlsServer.h +1 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
Android.bp +4 −6 Original line number Diff line number Diff line Loading @@ -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", Loading Loading @@ -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", ], Loading @@ -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", ], Loading @@ -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", Loading
Dns64Configuration.h +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <netinet/in.h> #include <condition_variable> #include <cstdlib> #include <functional> #include <mutex> #include <unordered_map> Loading
DnsTlsDispatcher.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading @@ -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()); } Loading Loading @@ -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); Loading
DnsTlsServer.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <algorithm> #include <android-base/format.h> #include <netdutils/InternetAddresses.h> namespace { Loading Loading @@ -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
DnsTlsServer.h +1 −0 Original line number Diff line number Diff line Loading @@ -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