[NetworkManager-openvpn] service: add logic to detect OpenVPN <=2.4
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [NetworkManager-openvpn] service: add logic to detect OpenVPN <=2.4
- Date: Mon, 29 Aug 2022 16:31:48 +0000 (UTC)
commit 1d47d12fac2930775a93508cb1e037dd7870b70b
Author: Ernestas Kulik <ernestas@baltic.engineering>
Date: Sun Aug 28 10:44:56 2022 +0300
service: add logic to detect OpenVPN <=2.4
Things like allow-compression are only supported it 2.4+, but there is
currently no way to detect it.
https://gitlab.gnome.org/GNOME/NetworkManager-openvpn/-/merge_requests/54
src/nm-openvpn-service.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 3731e89..cb9d01d 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -89,6 +89,7 @@ typedef enum {
OPENVPN_BINARY_VERSION_INVALID,
OPENVPN_BINARY_VERSION_UNKNOWN,
OPENVPN_BINARY_VERSION_2_3_OR_OLDER,
+ OPENVPN_BINARY_VERSION_2_4_OR_OLDER,
OPENVPN_BINARY_VERSION_2_4_OR_NEWER,
} OpenvpnBinaryVersion;
@@ -576,6 +577,9 @@ openvpn_binary_detect_version (const char *exepath)
if (n <= 3)
return OPENVPN_BINARY_VERSION_2_3_OR_OLDER;
+ if (n <= 4)
+ return OPENVPN_BINARY_VERSION_2_4_OR_OLDER;
+
return OPENVPN_BINARY_VERSION_2_4_OR_NEWER;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]