From: Jason A. Donenfeld Date: Tue, 8 Jan 2019 00:51:12 +0000 (+0100) Subject: PacketTunnelSettingsGenerator: use 127.0.0.1 as dummy address X-Git-Tag: 0.0.20190107-1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49f287439e85770cd9d80ae4fe8902f3f9e61acc;p=thirdparty%2Fwireguard-apple.git PacketTunnelSettingsGenerator: use 127.0.0.1 as dummy address It turns out that using 0.0.0.0 somehow conflicts with DNS lookups when CLAT is in use. Signed-off-by: Jason A. Donenfeld --- diff --git a/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift b/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift index b011c2a..f6eb722 100644 --- a/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift +++ b/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift @@ -63,9 +63,7 @@ class PacketTunnelSettingsGenerator { * make sense. So, we fill it in with this placeholder, which is not * a valid IP address that will actually route over the Internet. */ - let remoteAddress = "0.0.0.0" - - let networkSettings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: remoteAddress) + let networkSettings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "127.0.0.1") let dnsServerStrings = tunnelConfiguration.interface.dns.map { $0.stringRepresentation } let dnsSettings = NEDNSSettings(servers: dnsServerStrings)