VPN: Save the tunnel name when modifying a tunnel

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander 2018-10-28 14:55:24 +05:30
parent 31e5d33114
commit 1870a3d364
1 changed files with 3 additions and 0 deletions

View File

@ -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