Merge "Add clarifying comments on for IPsec forward policies" am: 1a88665f3c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702525 Change-Id: I7267d331065ceadb830a14170920810f053eacb8
This commit is contained in:
@@ -1112,7 +1112,7 @@ public class IpSecService extends IIpSecService.Stub {
|
|||||||
case IpSecManager.DIRECTION_IN:
|
case IpSecManager.DIRECTION_IN:
|
||||||
return;
|
return;
|
||||||
case IpSecManager.DIRECTION_FWD:
|
case IpSecManager.DIRECTION_FWD:
|
||||||
// Only NETWORK_STACK or PERMISSION_NETWORK_STACK allowed to use forward policies
|
// Only NETWORK_STACK or MAINLINE_NETWORK_STACK allowed to use forward policies
|
||||||
PermissionUtils.enforceNetworkStackPermission(mContext);
|
PermissionUtils.enforceNetworkStackPermission(mContext);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1358,6 +1358,16 @@ public class IpSecService extends IIpSecService.Stub {
|
|||||||
ikey,
|
ikey,
|
||||||
0xffffffff,
|
0xffffffff,
|
||||||
resourceId);
|
resourceId);
|
||||||
|
|
||||||
|
// Add a forwarding policy on the tunnel interface. In order to support forwarding
|
||||||
|
// the IpSecTunnelInterface must have a forwarding policy matching the incoming SA.
|
||||||
|
//
|
||||||
|
// Unless a IpSecTransform is also applied against this interface in DIRECTION_FWD,
|
||||||
|
// forwarding will be blocked by default (as would be the case if this policy was
|
||||||
|
// absent).
|
||||||
|
//
|
||||||
|
// This is necessary only on the tunnel interface, and not any the interface to
|
||||||
|
// which traffic will be forwarded to.
|
||||||
netd.ipSecAddSecurityPolicy(
|
netd.ipSecAddSecurityPolicy(
|
||||||
callerUid,
|
callerUid,
|
||||||
selAddrFamily,
|
selAddrFamily,
|
||||||
|
|||||||
Reference in New Issue
Block a user