WireGuardKit: Add TODO to log the error coming from `withReresolvedIP`
Signed-off-by: Andrej Mihajlov <and@mullvad.net>
This commit is contained in:
parent
a6858bd126
commit
384b514290
|
@ -19,6 +19,7 @@ class PacketTunnelSettingsGenerator {
|
||||||
var wgSettings = ""
|
var wgSettings = ""
|
||||||
for (index, peer) in tunnelConfiguration.peers.enumerated() {
|
for (index, peer) in tunnelConfiguration.peers.enumerated() {
|
||||||
wgSettings.append("public_key=\(peer.publicKey.hexKey)\n")
|
wgSettings.append("public_key=\(peer.publicKey.hexKey)\n")
|
||||||
|
// TODO: log the error returned by `withReresolvedIP`
|
||||||
if let endpoint = try? resolvedEndpoints[index]?.withReresolvedIP() {
|
if let endpoint = try? resolvedEndpoints[index]?.withReresolvedIP() {
|
||||||
if case .name(_, _) = endpoint.host { assert(false, "Endpoint is not resolved") }
|
if case .name(_, _) = endpoint.host { assert(false, "Endpoint is not resolved") }
|
||||||
wgSettings.append("endpoint=\(endpoint.stringRepresentation)\n")
|
wgSettings.append("endpoint=\(endpoint.stringRepresentation)\n")
|
||||||
|
|
Loading…
Reference in New Issue