diff options
author | Jonathan Basseri <misterikkit@google.com> | 2017-11-16 10:58:01 -0800 |
---|---|---|
committer | Nathan Harold <nharold@google.com> | 2017-12-12 13:50:35 -0800 |
commit | 5fb929032de14ca78163e1d0c42c34f6fb287da4 (patch) | |
tree | 5efce3a17f03238572ddc890a872ea3610be45c7 /tests/net/java/com/android/server/IpSecServiceTest.java | |
parent | 403c8f72e38114d0aadfd852b98b323827068e5b (diff) |
Use consistent naming for allocating SPI.
Throughout the IPsec code (API, system server, netd) we use "reserve"
SPI and "allocate" SPI interchangeably. This renames to use "allocate"
everywhere for self-consistency and consistency with the kernel
(ALLOCSPI).
In javadoc, I am leaving the word "reserve" in several places because it
is still an accurate description of how the method behaves.
Bug: 69128142
Test: TreeHugger should be enough
Change-Id: I8ea603b4612303b0393beef04032671fa53d2106
Diffstat (limited to 'tests/net/java/com/android/server/IpSecServiceTest.java')
-rw-r--r-- | tests/net/java/com/android/server/IpSecServiceTest.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/net/java/com/android/server/IpSecServiceTest.java b/tests/net/java/com/android/server/IpSecServiceTest.java index 0720886f8816..6cea9a8a0ba2 100644 --- a/tests/net/java/com/android/server/IpSecServiceTest.java +++ b/tests/net/java/com/android/server/IpSecServiceTest.java @@ -255,7 +255,7 @@ public class IpSecServiceTest { for (String address : invalidAddresses) { try { IpSecSpiResponse spiResp = - mIpSecService.reserveSecurityParameterIndex( + mIpSecService.allocateSecurityParameterIndex( IpSecTransform.DIRECTION_OUT, address, DROID_SPI, new Binder()); fail("Invalid address was passed through IpSecService validation: " + address); } catch (IllegalArgumentException e) { @@ -336,7 +336,7 @@ public class IpSecServiceTest { // Reserve spis until it fails. for (int i = 0; i < MAX_NUM_SPIS; i++) { IpSecSpiResponse newSpi = - mIpSecService.reserveSecurityParameterIndex( + mIpSecService.allocateSecurityParameterIndex( 0x1, InetAddress.getLoopbackAddress().getHostAddress(), DROID_SPI + i, @@ -352,7 +352,7 @@ public class IpSecServiceTest { // Try to reserve one more SPI, and should fail. IpSecSpiResponse extraSpi = - mIpSecService.reserveSecurityParameterIndex( + mIpSecService.allocateSecurityParameterIndex( 0x1, InetAddress.getLoopbackAddress().getHostAddress(), DROID_SPI + MAX_NUM_SPIS, @@ -366,7 +366,7 @@ public class IpSecServiceTest { // Should successfully reserve one more spi. extraSpi = - mIpSecService.reserveSecurityParameterIndex( + mIpSecService.allocateSecurityParameterIndex( 0x1, InetAddress.getLoopbackAddress().getHostAddress(), DROID_SPI + MAX_NUM_SPIS, |