summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java12
-rw-r--r--remoteExample/build.gradle2
-rw-r--r--vpndialogxposed/build.gradle2
3 files changed, 12 insertions, 4 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java b/main/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java
index 705d737b..d3c69ef1 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java
@@ -173,8 +173,15 @@ public class NetworkSpace {
public boolean containsNet(ipAddress network) {
// this.first >= net.first && this.last <= net.last
- return getFirstAddress().compareTo(network.getFirstAddress()) != -1 &&
- getLastAddress().compareTo(network.getLastAddress()) != 1;
+ BigInteger ourFirst = getFirstAddress();
+ BigInteger ourLast = getLastAddress();
+ BigInteger netFirst = network.getFirstAddress();
+ BigInteger netLast = network.getLastAddress();
+
+ boolean a = ourFirst.compareTo(netFirst) != 1;
+ boolean b = ourLast.compareTo(netLast) != -1;
+ return a && b;
+
}
}
@@ -321,6 +328,7 @@ public class NetworkSpace {
boolean skipIp=false;
// If there is any smaller net that is excluded we may not add the positive route back
+
for (ipAddress calculatedIp: ipsSorted) {
if(!calculatedIp.included && origIp.containsNet(calculatedIp)) {
skipIp=true;
diff --git a/remoteExample/build.gradle b/remoteExample/build.gradle
index a7e79b70..78361ba5 100644
--- a/remoteExample/build.gradle
+++ b/remoteExample/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 21
- buildToolsVersion "19.1.0"
+ buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 15
diff --git a/vpndialogxposed/build.gradle b/vpndialogxposed/build.gradle
index b8cd5678..345807ea 100644
--- a/vpndialogxposed/build.gradle
+++ b/vpndialogxposed/build.gradle
@@ -15,7 +15,7 @@ dependencies {
android {
compileSdkVersion 21
- buildToolsVersion "19.1.0"
+ buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 14