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

Commit 0e1eba68 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Move bug workaround for old resolvers past the Private DNS codepath"...

Merge "Move bug workaround for old resolvers past the Private DNS codepath" am: f7fca930 am: 0fa0e778 am: 40324473

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

Change-Id: Ib5f9a70ac6c72d8bae02ef635446bb10530dc0eb
parents c7ea829f 40324473
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
@@ -509,11 +509,6 @@ int res_nsend(ResState* statp, const uint8_t* buf, int buflen, uint8_t* ans, int
        return -ESRCH;
        return -ESRCH;
    }
    }


    // If parallel_lookup is enabled, it might be required to wait some time to avoid
    // gateways drop packets if queries are sent too close together
    if (sleepTimeMs != 0ms) {
        std::this_thread::sleep_for(sleepTimeMs);
    }
    // Private DNS
    // Private DNS
    if (!(statp->netcontext_flags & NET_CONTEXT_FLAG_USE_LOCAL_NAMESERVERS)) {
    if (!(statp->netcontext_flags & NET_CONTEXT_FLAG_USE_LOCAL_NAMESERVERS)) {
        bool fallback = false;
        bool fallback = false;
@@ -533,6 +528,12 @@ int res_nsend(ResState* statp, const uint8_t* buf, int buflen, uint8_t* ans, int
        }
        }
    }
    }


    // If parallel_lookup is enabled, it might be required to wait some time to avoid
    // gateways from dropping packets if queries are sent too close together.
    if (sleepTimeMs != 0ms) {
        std::this_thread::sleep_for(sleepTimeMs);
    }

    res_stats stats[MAXNS]{};
    res_stats stats[MAXNS]{};
    res_params params;
    res_params params;
    int revision_id = resolv_cache_get_resolver_stats(statp->netid, &params, stats, statp->nsaddrs);
    int revision_id = resolv_cache_get_resolver_stats(statp->netid, &params, stats, statp->nsaddrs);