summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com
diff options
context:
space:
mode:
authorAurélien Chabot <aurelien@chabot.fr>2018-03-02 20:48:35 +1100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-04-17 02:15:24 +0200
commitc6d311923a547b0c400b2d7ddb8ba64c3f83d157 (patch)
tree593c0e07fa22546d5a1131496ccb5699e75244a8 /app/src/main/java/com
parent6878aba91166824d4206ddf94c85783a095ad92d (diff)
GoBackend: Parse the dns address
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java/com')
-rw-r--r--app/src/main/java/com/wireguard/android/backend/GoBackend.java2
1 files changed, 1 insertions, 1 deletions
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) {