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 7be7f4596a)
This commit is contained in:
@@ -104,7 +104,6 @@ public class IpSecService extends IIpSecService.Stub {
|
|||||||
|
|
||||||
static final int FREE_PORT_MIN = 1024; // ports 1-1023 are reserved
|
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 int PORT_MAX = 0xFFFF; // ports are an unsigned 16-bit integer
|
||||||
static final String TUNNEL_INTERFACE_PREFIX = "ipsec";
|
|
||||||
|
|
||||||
/* Binder context for this service */
|
/* Binder context for this service */
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
@@ -1257,7 +1256,7 @@ public class IpSecService extends IIpSecService.Stub {
|
|||||||
final int resourceId = mNextResourceId++;
|
final int resourceId = mNextResourceId++;
|
||||||
final int ikey = reserveNetId();
|
final int ikey = reserveNetId();
|
||||||
final int okey = 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 {
|
try {
|
||||||
// Calls to netd:
|
// Calls to netd:
|
||||||
|
|||||||
Reference in New Issue
Block a user