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

Commit 81568fb7 authored by Luke Huang's avatar Luke Huang
Browse files

Add VPN test for DnsResolver

Test {enable, disable}VpnIsolation + secure VPN and bypassable VPN
with some different network selection scenarios.

Test: atest
Bug: 159783741
Bug: 159994981
Bug: 161509097

Change-Id: I4abb7311d0d3330efd1f820cef741f4650beb120
parent 96b09e2e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -161,6 +161,10 @@ class DNSResponder {
        : DNSResponder(kDefaultListenAddr, kDefaultListenService, kDefaultErrorCode,
                       mapping_type){};

    DNSResponder(unsigned netId, std::string listen_address) : DNSResponder(listen_address) {
        mNetId = netId;
    };

    ~DNSResponder();

    // Functions used for accessing mapping {ADDRESS_OR_HOSTNAME, DNS_HEADER, BINARY_PACKET}.
+364 −98

File changed.

Preview size limit exceeded, changes collapsed.

+2 −1
Original line number Diff line number Diff line
@@ -82,8 +82,9 @@ struct DnsRecord {

// TODO: make this dynamic and stop depending on implementation details.
constexpr int TEST_NETID = 30;
// Use maximum reserved appId for applications to avoid conflict with existing uids.
// Use the biggest two reserved appId for applications to avoid conflict with existing uids.
constexpr int TEST_UID = 99999;
constexpr int TEST_UID2 = 99998;

static constexpr char kLocalHost[] = "localhost";
static constexpr char kLocalHostAddr[] = "127.0.0.1";