Merge "Check mOwnedByTransform to avoid DELSA on SPI"

This commit is contained in:
nharold
2018-03-21 01:27:22 +00:00
committed by Gerrit Code Review

View File

@@ -676,10 +676,12 @@ public class IpSecService extends IIpSecService.Stub {
@Override @Override
public void freeUnderlyingResources() { public void freeUnderlyingResources() {
try { try {
mSrvConfig if (!mOwnedByTransform) {
.getNetdInstance() mSrvConfig
.ipSecDeleteSecurityAssociation( .getNetdInstance()
mResourceId, mSourceAddress, mDestinationAddress, mSpi, 0, 0); .ipSecDeleteSecurityAssociation(
mResourceId, mSourceAddress, mDestinationAddress, mSpi, 0, 0);
}
} catch (ServiceSpecificException | RemoteException e) { } catch (ServiceSpecificException | RemoteException e) {
Log.e(TAG, "Failed to delete SPI reservation with ID: " + mResourceId, e); Log.e(TAG, "Failed to delete SPI reservation with ID: " + mResourceId, e);
} }