]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
PacketTunnelSettingsGenerator: use 127.0.0.1 as dummy address
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 8 Jan 2019 00:51:12 +0000 (01:51 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 8 Jan 2019 00:51:12 +0000 (01:51 +0100)
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 <Jason@zx2c4.com>
WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift

index b011c2a0827aa17f13507e0f9ba5ea157e17abd8..f6eb722337b78fde96461486668d796932eb6827 100644 (file)
@@ -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)