Revert "[KA11] Verify fd ownership and allocate resource for NattKeepalive"
This reverts commit 2bb85a0bc0.
Reason for revert: Adds dependency between IpSecService and
ConnectivityService may lead to future deadlock
problems. Uses a simpler approach instead,
hence the solution is not needed.
See aosp/954040.
Change-Id: If6d537a39595cf132d3ed81d4eaac6700f5f0ab3
This commit is contained in:
@@ -4266,25 +4266,6 @@ public class ConnectivityServiceTest {
|
||||
callback.expectStarted();
|
||||
ka.stop();
|
||||
callback.expectStopped();
|
||||
|
||||
// Check that the same NATT socket cannot be used by 2 keepalives.
|
||||
try (SocketKeepalive ka2 = mCm.createSocketKeepalive(
|
||||
myNet, testSocket, myIPv4, dstIPv4, executor, callback)) {
|
||||
// Check that second keepalive cannot be started if the first one is running.
|
||||
ka.start(validKaInterval);
|
||||
callback.expectStarted();
|
||||
ka2.start(validKaInterval);
|
||||
callback.expectError(SocketKeepalive.ERROR_INVALID_SOCKET);
|
||||
ka.stop();
|
||||
callback.expectStopped();
|
||||
|
||||
// Check that second keepalive can be started/stopped normally if the first one is
|
||||
// stopped.
|
||||
ka2.start(validKaInterval);
|
||||
callback.expectStarted();
|
||||
ka2.stop();
|
||||
callback.expectStopped();
|
||||
}
|
||||
}
|
||||
|
||||
// Check that deleting the IP address stops the keepalive.
|
||||
@@ -4348,10 +4329,6 @@ public class ConnectivityServiceTest {
|
||||
testSocket.close();
|
||||
testSocket2.close();
|
||||
}
|
||||
|
||||
// Check that the closed socket cannot be used to start keepalive.
|
||||
ka.start(validKaInterval);
|
||||
callback.expectError(SocketKeepalive.ERROR_INVALID_SOCKET);
|
||||
}
|
||||
|
||||
// Check that there is no port leaked after all keepalives and sockets are closed.
|
||||
|
||||
Reference in New Issue
Block a user