summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xservice/src/com/android/server/ConnectivityService.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/service/src/com/android/server/ConnectivityService.java b/service/src/com/android/server/ConnectivityService.java
index 52889beb7c..5024f14166 100755
--- a/service/src/com/android/server/ConnectivityService.java
+++ b/service/src/com/android/server/ConnectivityService.java
@@ -8984,10 +8984,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
* interfaces.
* Ingress discard rule is added to the address iff
* 1. The address is not a link local address
- * 2. The address is used by a single non-Legacy VPN interface and not used by any other
- * interfaces even non-VPN ones
- * Ingress discard rule is not be added to Legacy VPN since some Legacy VPNs need to receive
- * packet to VPN address via non-VPN interface.
+ * 2. The address is used by a single interface of VPN whose VPN type is not TYPE_VPN_LEGACY
+ * or TYPE_VPN_OEM and the address is not used by any other interfaces even non-VPN ones
+ * Ingress discard rule is not be added to TYPE_VPN_LEGACY or TYPE_VPN_OEM VPN since these VPNs
+ * might need to receive packet to VPN address via non-VPN interface.
* This method can be called during network disconnects, when nai has already been removed from
* mNetworkAgentInfos.
*
@@ -9022,8 +9022,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
// for different network.
final Set<Pair<InetAddress, String>> ingressDiscardRules = new ArraySet<>();
for (final NetworkAgentInfo agent : nais) {
+ final int vpnType = getVpnType(agent);
if (!agent.isVPN() || agent.isDestroyed()
- || getVpnType(agent) == VpnManager.TYPE_VPN_LEGACY) {
+ || vpnType == VpnManager.TYPE_VPN_LEGACY
+ || vpnType == VpnManager.TYPE_VPN_OEM) {
continue;
}
final LinkProperties agentLp = (nai == agent) ? lp : agent.linkProperties;