Call setUnderlyingNetwork to complete VCN MOBIKE
This change updates the underlying network for the VCN in order to ensure full MOBIKE switches are handled. Bug: 169788130 Test: atest FrameworksVcnTests Change-Id: Ib439bde4217beeb28f425c08ed9f3376dfe0033c
This commit is contained in:
@@ -1478,7 +1478,7 @@ public class VcnGatewayConnection extends StateMachine {
|
||||
@NonNull IpSecTransform transform,
|
||||
int direction) {
|
||||
try {
|
||||
// TODO(b/180163196): Set underlying network of tunnel interface
|
||||
tunnelIface.setUnderlyingNetwork(underlyingNetwork);
|
||||
|
||||
// Transforms do not need to be persisted; the IkeSession will keep them alive
|
||||
mIpSecManager.applyTunnelModeTransform(tunnelIface, direction, transform);
|
||||
|
||||
@@ -36,6 +36,7 @@ import static org.mockito.Matchers.eq;
|
||||
import static org.mockito.Mockito.doReturn;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
|
||||
@@ -143,11 +144,18 @@ public class VcnGatewayConnectionConnectedStateTest extends VcnGatewayConnection
|
||||
.onIpSecTransformsMigrated(makeDummyIpSecTransform(), makeDummyIpSecTransform());
|
||||
mTestLooper.dispatchAll();
|
||||
|
||||
verify(mIpSecSvc, times(2))
|
||||
.setNetworkForTunnelInterface(
|
||||
eq(TEST_IPSEC_TUNNEL_RESOURCE_ID),
|
||||
eq(TEST_UNDERLYING_NETWORK_RECORD_1.network),
|
||||
any());
|
||||
|
||||
for (int direction : new int[] {DIRECTION_IN, DIRECTION_OUT}) {
|
||||
verify(mIpSecSvc)
|
||||
.applyTunnelModeTransform(
|
||||
eq(TEST_IPSEC_TUNNEL_RESOURCE_ID), eq(direction), anyInt(), any());
|
||||
}
|
||||
|
||||
assertEquals(mGatewayConnection.mConnectedState, mGatewayConnection.getCurrentState());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user