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

Commit d4db011b authored by Luke Huang's avatar Luke Huang
Browse files

Revert "Revert "Enable getaddrinfo parallel lookup by default""

This reverts commit aa483269.

Also set the required tls_frontend option in resolv_gold_test
to make it compatible with parallel_lookup enabled.

Reason for revert: The TLS issue is expected to be solved in aosp/1492679. Re-enable this feature by defualt.

Bug: 168607036
Test: atest

Change-Id: I62b84190006306a63d471c8ccd538bbc32720ab9
parent e3fdcc86
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1710,7 +1710,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", 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());