Merge "Bypass VPN lockdown for clat initialization"

This commit is contained in:
Maciej Żenczykowski
2022-10-25 07:43:12 +00:00
committed by Gerrit Code Review
6 changed files with 26 additions and 15 deletions

View File

@@ -220,12 +220,12 @@ public class ClatCoordinatorTest {
*/
@Override
public String generateIpv6Address(@NonNull String iface, @NonNull String v4,
@NonNull String prefix64) throws IOException {
@NonNull String prefix64, int mark) throws IOException {
if (BASE_IFACE.equals(iface) && XLAT_LOCAL_IPV4ADDR_STRING.equals(v4)
&& NAT64_PREFIX_STRING.equals(prefix64)) {
return XLAT_LOCAL_IPV6ADDR_STRING;
}
fail("unsupported args: " + iface + ", " + v4 + ", " + prefix64);
fail("unsupported args: " + iface + ", " + v4 + ", " + prefix64 + ", " + mark);
return null;
}
@@ -417,7 +417,7 @@ public class ClatCoordinatorTest {
// Generate a checksum-neutral IID.
inOrder.verify(mDeps).generateIpv6Address(eq(BASE_IFACE),
eq(XLAT_LOCAL_IPV4ADDR_STRING), eq(NAT64_PREFIX_STRING));
eq(XLAT_LOCAL_IPV4ADDR_STRING), eq(NAT64_PREFIX_STRING), eq(MARK));
// Open, configure and bring up the tun interface.
inOrder.verify(mDeps).createTunInterface(eq(STACKED_IFACE));
@@ -617,7 +617,7 @@ public class ClatCoordinatorTest {
class FailureDependencies extends TestDependencies {
@Override
public String generateIpv6Address(@NonNull String iface, @NonNull String v4,
@NonNull String prefix64) throws IOException {
@NonNull String prefix64, int mark) throws IOException {
throw new IOException();
}
}