From: Roopesh Chander Date: Sun, 28 Oct 2018 09:25:24 +0000 (+0530) Subject: VPN: Save the tunnel name when modifying a tunnel X-Git-Tag: 0.0.20181104-1~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1870a3d364bb5c314cfdc9049060c02750c8f791;p=thirdparty%2Fwireguard-apple.git VPN: Save the tunnel name when modifying a tunnel Signed-off-by: Roopesh Chander --- diff --git a/WireGuard/WireGuard/VPN/TunnelsManager.swift b/WireGuard/WireGuard/VPN/TunnelsManager.swift index 7822ee2..2bbbac2 100644 --- a/WireGuard/WireGuard/VPN/TunnelsManager.swift +++ b/WireGuard/WireGuard/VPN/TunnelsManager.swift @@ -96,6 +96,9 @@ class TunnelsManager { let tunnelProviderManager = tunnel.tunnelProvider let isNameChanged = (tunnelName != tunnelProviderManager.localizedDescription) + if (isNameChanged) { + tunnel.name = tunnelName + } tunnelProviderManager.protocolConfiguration = NETunnelProviderProtocol(tunnelConfiguration: tunnelConfiguration) tunnelProviderManager.localizedDescription = tunnelName tunnelProviderManager.isEnabled = true