From 8ce535e672efb48e82a559bac0f5be7136c82344 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Tue, 22 Nov 2016 18:22:28 +0000 Subject: check for valid nameserver --- src/main/java/org/xapek/andiodine/IodineVpnService.java | 5 +++++ 1 file changed, 5 insertions(+) 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(); } -- cgit v1.2.1