Remove the return value of ipSecAddSecurityAssociation
Bug:38350493
Test: runtest -x tests/netd_integration_test.cpp
Change-Id: I48f8462d94e8c4e95d6766c1ce7f24b8a596b743
diff --git a/server/NetdNativeService.cpp b/server/NetdNativeService.cpp
index f0729b1..cb767fe 100644
--- a/server/NetdNativeService.cpp
+++ b/server/NetdNativeService.cpp
@@ -350,8 +350,7 @@
const std::string& cryptAlgo, const std::vector<uint8_t>& cryptKey, int32_t cryptTruncBits,
int32_t encapType,
int32_t encapLocalPort,
- int32_t encapRemotePort,
- int32_t* allocatedSpi) {
+ int32_t encapRemotePort) {
// Necessary locking done in IpSecService and kernel
ENFORCE_PERMISSION(CONNECTIVITY_INTERNAL);
ALOGD("ipSecAddSecurityAssociation()");
@@ -361,8 +360,7 @@
spi,
authAlgo, authKey, authTruncBits,
cryptAlgo, cryptKey, cryptTruncBits,
- encapType, encapLocalPort, encapRemotePort,
- allocatedSpi));
+ encapType, encapLocalPort, encapRemotePort));
}
binder::Status NetdNativeService::ipSecDeleteSecurityAssociation(
diff --git a/server/NetdNativeService.h b/server/NetdNativeService.h
index fbe860c..ad44810 100644
--- a/server/NetdNativeService.h
+++ b/server/NetdNativeService.h
@@ -88,8 +88,7 @@
int32_t cryptTruncBits,
int32_t encapType,
int32_t encapLocalPort,
- int32_t encapRemotePort,
- int32_t* allocatedSpi);
+ int32_t encapRemotePort);
binder::Status ipSecDeleteSecurityAssociation(
int32_t transformId,
diff --git a/server/XfrmController.cpp b/server/XfrmController.cpp
index 344b268..34df936 100644
--- a/server/XfrmController.cpp
+++ b/server/XfrmController.cpp
@@ -359,7 +359,7 @@
const std::string& remoteAddress, int64_t underlyingNetworkHandle, int32_t spi,
const std::string& authAlgo, const std::vector<uint8_t>& authKey, int32_t authTruncBits,
const std::string& cryptAlgo, const std::vector<uint8_t>& cryptKey, int32_t cryptTruncBits,
- int32_t encapType, int32_t encapLocalPort, int32_t encapRemotePort, int32_t* allocatedSpi) {
+ int32_t encapType, int32_t encapLocalPort, int32_t encapRemotePort) {
android::RWLock::AutoWLock lock(mLock);
ALOGD("XfrmController::%s, line=%d", __FUNCTION__, __LINE__);
@@ -444,7 +444,6 @@
return ret; // something went wrong creating the SA
}
- *allocatedSpi = spi;
return 0;
}
diff --git a/server/XfrmController.h b/server/XfrmController.h
index 1c9b406..739d8d1 100644
--- a/server/XfrmController.h
+++ b/server/XfrmController.h
@@ -116,7 +116,7 @@
const std::string& remoteAddress, int64_t underlyingNetworkHandle, int32_t spi,
const std::string& authAlgo, const std::vector<uint8_t>& authKey, int32_t authTruncBits,
const std::string& cryptAlgo, const std::vector<uint8_t>& cryptKey, int32_t cryptTruncBits,
- int32_t encapType, int32_t encapLocalPort, int32_t encapRemotePort, int32_t* allocatedSpi);
+ int32_t encapType, int32_t encapLocalPort, int32_t encapRemotePort);
int ipSecDeleteSecurityAssociation(int32_t transformId, int32_t direction,
const std::string& localAddress,
diff --git a/server/binder/android/net/INetd.aidl b/server/binder/android/net/INetd.aidl
index 54ba684..f89b49b 100644
--- a/server/binder/android/net/INetd.aidl
+++ b/server/binder/android/net/INetd.aidl
@@ -237,9 +237,8 @@
* @param encapType encapsulation type used (if any) for the udp encap socket
* @param encapLocalPort the port number on the host to be used in encap packets
* @param encapRemotePort the port number of the remote to be used for encap packets
- * @return the spi that was used to create this SA (should match the SPI paramter)
*/
- int ipSecAddSecurityAssociation(
+ void ipSecAddSecurityAssociation(
int transformId,
int mode,
int direction,