summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nathan Harold <nharold@google.com> 2018-04-26 11:47:14 -0700
committer Nathan Harold <nharold@google.com> 2018-05-14 22:47:24 -0700
commit0e84fb6534a69de19e489456eb5ab8552a7827d6 (patch)
treecc894996baf8751562b43c536a54a64a3477169c
parent0c94c5065d49039a316274780b48af658183e6bd (diff)
Use INetd Constant for IpSec Interface Prefix
Convert to using a constant in INetd to ensure that there is a consistent tunnel prefix between Java and native code. Bug: 74560705 Test: atest FramworksNetTest; atest CtsNetTestCases Change-Id: Ida233aac2e6c6b26567463964e0ebac9d52eff1e (cherry picked from commit 649df5e07a968ac98b41a1da60a04d59149d2385)
-rw-r--r--services/core/java/com/android/server/IpSecService.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/IpSecService.java b/services/core/java/com/android/server/IpSecService.java
index 33ca02fecb70..60f1877d3739 100644
--- a/services/core/java/com/android/server/IpSecService.java
+++ b/services/core/java/com/android/server/IpSecService.java
@@ -107,7 +107,6 @@ public class IpSecService extends IIpSecService.Stub {
static final int FREE_PORT_MIN = 1024; // ports 1-1023 are reserved
static final int PORT_MAX = 0xFFFF; // ports are an unsigned 16-bit integer
- static final String TUNNEL_INTERFACE_PREFIX = "ipsec";
/* Binder context for this service */
private final Context mContext;
@@ -1270,7 +1269,7 @@ public class IpSecService extends IIpSecService.Stub {
final int resourceId = mNextResourceId++;
final int ikey = reserveNetId();
final int okey = reserveNetId();
- String intfName = String.format("%s%d", TUNNEL_INTERFACE_PREFIX, resourceId);
+ String intfName = String.format("%s%d", INetd.IPSEC_INTERFACE_PREFIX, resourceId);
try {
// Calls to netd: