summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/xapek/andiodine/IodineVpnService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/xapek/andiodine/IodineVpnService.java b/src/main/java/org/xapek/andiodine/IodineVpnService.java
index 80df946..02544b5 100644
--- a/src/main/java/org/xapek/andiodine/IodineVpnService.java
+++ b/src/main/java/org/xapek/andiodine/IodineVpnService.java
@@ -210,6 +210,11 @@ public class IodineVpnService extends VpnService implements Runnable {
setStatus(ACTION_STATUS_CONNECT, mConfiguration.getId(), null);
String tunnelNamesver = IodineClient.getPropertyNetDns1();
+ if (tunnelNamesver == "") {
+ Log.e(TAG, "No valid IPv4 name servers detected. Aborting...");
+ return;
+ }
+ Log.d(TAG, "using name server: " + tunnelNamesver);
if (!"".equals(mConfiguration.getTunnelNameserver())) {
tunnelNamesver = mConfiguration.getTunnelNameserver();
}