diff options
author | Roopesh Chander <roop@roopc.net> | 2018-11-10 17:02:30 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2018-11-10 17:02:30 +0530 |
commit | 290f83d5ef4d26e11d0b6eaccd47fcda7d359ae3 (patch) | |
tree | 8f1c9edb5f97bfd327bfa6b84e044ebba71d41e5 /WireGuard/WireGuard/ConfigFile/WgQuickConfigFileParser.swift | |
parent | VPN: When activating while another tunnel is active, deactivate the other tunnel (diff) | |
download | wireguard-apple-290f83d5ef4d26e11d0b6eaccd47fcda7d359ae3.tar.xz wireguard-apple-290f83d5ef4d26e11d0b6eaccd47fcda7d359ae3.zip |
Model: Ensure that a TunnelConfiguration always has a valid array of peers
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/ConfigFile/WgQuickConfigFileParser.swift | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/WireGuard/WireGuard/ConfigFile/WgQuickConfigFileParser.swift b/WireGuard/WireGuard/ConfigFile/WgQuickConfigFileParser.swift index 863cd11..0ded15e 100644 --- a/WireGuard/WireGuard/ConfigFile/WgQuickConfigFileParser.swift +++ b/WireGuard/WireGuard/ConfigFile/WgQuickConfigFileParser.swift @@ -157,8 +157,7 @@ class WgQuickConfigFileParser { } if let interfaceConfiguration = interfaceConfiguration { - let tunnelConfiguration = TunnelConfiguration(interface: interfaceConfiguration) - tunnelConfiguration.peers = peerConfigurations + let tunnelConfiguration = TunnelConfiguration(interface: interfaceConfiguration, peers: peerConfigurations) return tunnelConfiguration } else { throw ParseError.noInterface |