From 753403429c97f6c895a4f68742eaed4b4e710e5e Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Fri, 5 Jan 2024 18:30:39 +0100 Subject: [PATCH 1/3] Fix regression in mapping OpenVPN errors --- .../TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift b/Sources/TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift index 29ce9862..a8441397 100644 --- a/Sources/TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift +++ b/Sources/TunnelKitOpenVPNAppExtension/OpenVPNTunnelProvider.swift @@ -684,8 +684,8 @@ private extension OpenVPNTunnelProvider { } func openVPNError(from error: Error) -> TunnelKitOpenVPNError? { - if let specificError = error as? OpenVPNError { - switch specificError.asNativeOpenVPNError ?? specificError { + if let specificError = error.asNativeOpenVPNError ?? error as? OpenVPNError { + switch specificError { case .negotiationTimeout, .pingTimeout, .staleSession: return .timeout From d321bced17e9f921c7b0b391d667997a927bd5d2 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Fri, 5 Jan 2024 21:00:29 +0100 Subject: [PATCH 2/3] Update CL --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9acfd5cf..d93a529c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- Bad mapping of OpenVPN errors. [#404](https://github.com/passepartoutvpn/tunnelkit/pull/404) + ## 6.3.1 (2024-01-05) ### Changed From e6b20aa7aa3416e20c0328c401fa38b9c905138b Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Fri, 5 Jan 2024 21:08:47 +0100 Subject: [PATCH 3/3] [ci skip] CL --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d93a529c..e1c7c2d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Bad mapping of OpenVPN errors. [#404](https://github.com/passepartoutvpn/tunnelkit/pull/404) +- OpenVPN: Bad error mapping. [#404](https://github.com/passepartoutvpn/tunnelkit/pull/404) ## 6.3.1 (2024-01-05)