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

Commit 6b2af5ff authored by Luke Huang's avatar Luke Huang Committed by Automerger Merge Worker
Browse files

Merge changes I44e7d51e,I62b84190 am: 5bc3d458 am: b9f2b443 am: c2d2a3b1

Original change: https://android-review.googlesource.com/c/platform/packages/modules/DnsResolver/+/1517564

Change-Id: I64a13675cb6e64cea6f31eb244c8ccc1ccdbcafb
parents 2c2ea24c c2d2a3b1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ class Experiments {
    // TODO: Migrate other experiment flags to here.
    // (retry_count, retransmission_time_interval)
    static constexpr const char* const kExperimentFlagKeyList[] = {
            "keep_listening_udp", "parallel_lookup",     "parallel_lookup_sleep_time",
            "keep_listening_udp", "parallel_lookup_release", "parallel_lookup_sleep_time",
            "sort_nameservers",   "dot_async_handshake",     "dot_connect_timeout_ms",
            "dot_maxtries",
    };
+1 −1
Original line number Diff line number Diff line
@@ -1707,7 +1707,7 @@ static int res_queryN_parallel(const char* name, res_target* target, res_state r

static int res_queryN_wrapper(const char* name, res_target* target, res_state res, int* herrno) {
    const bool parallel_lookup =
            android::net::Experiments::getInstance()->getFlag("parallel_lookup", 0);
            android::net::Experiments::getInstance()->getFlag("parallel_lookup_release", 1);
    if (parallel_lookup) return res_queryN_parallel(name, target, res, herrno);

    return res_queryN(name, target, res, herrno);
+2 −0
Original line number Diff line number Diff line
@@ -368,6 +368,7 @@ TEST_F(ResolvGetAddrInfo, BasicTlsQuery) {
    ASSERT_TRUE(tls.startServer());
    ASSERT_NO_FATAL_FAILURE(SetResolversWithTls());
    EXPECT_TRUE(WaitForPrivateDnsValidation(tls.listen_address()));
    tls.setDelayQueries(2);

    dns.clearQueries();
    addrinfo* res = nullptr;
@@ -429,6 +430,7 @@ TEST_P(ResolvGoldTest, GoldData) {
    test::DNSResponder dns(test::DNSResponder::MappingType::BINARY_PACKET);
    ASSERT_TRUE(dns.startServer());
    test::DnsTlsFrontend tls;
    tls.setDelayQueries(2);

    if (protocol == DnsProtocol::CLEARTEXT) {
        ASSERT_NO_FATAL_FAILURE(SetResolvers());
+2 −2
Original line number Diff line number Diff line
@@ -5301,7 +5301,7 @@ TEST_F(ResolverTest, GetAddrInfoParallelLookupTimeout) {
    neverRespondDns.setResponseProbability(0.0);
    StartDns(neverRespondDns, records);
    ScopedSystemProperties scopedSystemProperties(
            "persist.device_config.netd_native.parallel_lookup", "1");
            "persist.device_config.netd_native.parallel_lookup_release", "1");
    // The default value of parallel_lookup_sleep_time should be very small
    // that we can ignore in this test case.
    // Re-setup test network to make experiment flag take effect.
@@ -5336,7 +5336,7 @@ TEST_F(ResolverTest, GetAddrInfoParallelLookupSleepTime) {
    test::DNSResponder dns(listen_addr);
    StartDns(dns, records);
    ScopedSystemProperties scopedSystemProperties1(
            "persist.device_config.netd_native.parallel_lookup", "1");
            "persist.device_config.netd_native.parallel_lookup_release", "1");
    constexpr int PARALLEL_LOOKUP_SLEEP_TIME_MS = 500;
    ScopedSystemProperties scopedSystemProperties2(
            "persist.device_config.netd_native.parallel_lookup_sleep_time",