From 3e1f48932a3dc6ff4e06c04442233bfba3009e71 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Sat, 7 Feb 2026 16:49:15 +0000 Subject: [PATCH] fix(openvpn): only log openvpn version corresponding to OPENVPN_VERSION --- cmd/gluetun/main.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/gluetun/main.go b/cmd/gluetun/main.go index df017012..9934c7d6 100644 --- a/cmd/gluetun/main.go +++ b/cmd/gluetun/main.go @@ -22,6 +22,7 @@ import ( "github.com/qdm12/gluetun/internal/configuration/sources/files" "github.com/qdm12/gluetun/internal/configuration/sources/secrets" "github.com/qdm12/gluetun/internal/constants" + copenvpn "github.com/qdm12/gluetun/internal/constants/openvpn" "github.com/qdm12/gluetun/internal/dns" "github.com/qdm12/gluetun/internal/firewall" "github.com/qdm12/gluetun/internal/healthcheck" @@ -269,11 +270,14 @@ func _main(ctx context.Context, buildInfo models.BuildInformation, ovpnConf := openvpn.New( logger.New(log.SetComponent("openvpn configurator")), cmder, puid, pgid) + ovpnVersion := ovpnConf.Version26 + if allSettings.VPN.OpenVPN.Version == copenvpn.Openvpn25 { + ovpnVersion = ovpnConf.Version25 + } err = printVersions(ctx, logger, []printVersionElement{ {name: "Alpine", getVersion: alpineConf.Version}, - {name: "OpenVPN 2.5", getVersion: ovpnConf.Version25}, - {name: "OpenVPN 2.6", getVersion: ovpnConf.Version26}, + {name: "OpenVPN", getVersion: ovpnVersion}, {name: "IPtables", getVersion: firewallConf.Version}, }) if err != nil {