From c6d311923a547b0c400b2d7ddb8ba64c3f83d157 Mon Sep 17 00:00:00 2001 From: Aurélien Chabot Date: Fri, 2 Mar 2018 20:48:35 +1100 Subject: GoBackend: Parse the dns address Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/android/backend/GoBackend.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src/main/java/com/wireguard/android') diff --git a/app/src/main/java/com/wireguard/android/backend/GoBackend.java b/app/src/main/java/com/wireguard/android/backend/GoBackend.java index 51c4c971..a2e872c0 100644 --- a/app/src/main/java/com/wireguard/android/backend/GoBackend.java +++ b/app/src/main/java/com/wireguard/android/backend/GoBackend.java @@ -191,7 +191,7 @@ public final class GoBackend implements Backend { InetAddress address = InetAddress.getByName(config.getInterface().getAddress()); builder.addAddress(address.getHostAddress(), (address instanceof Inet4Address) ? 32 : 128); if (config.getInterface().getDns() != null) - builder.addDnsServer(config.getInterface().getDns()); + builder.addDnsServer(InetAddress.getByName(config.getInterface().getDns()).getHostAddress()); for (final Peer peer : config.getPeers()) { if (peer.getAllowedIPs() != null) { -- cgit v1.2.3