From: "cron2 (Code Review)" Date: Wed, 25 Feb 2026 08:42:52 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., selva.nair@...277..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="d3mQjhQH9ps="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: Fixup version command on management interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: selvanair , plaisthos , flichtenheld Cc: openvpn-devel --d3mQjhQH9ps= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#6) to the change originally created by= selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/1528?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: Fixup version command on management interface ...................................................................... Fixup version command on management interface All commands to the management interface are supposed to be responded with either a one-line "SUCCESS:/ERROR:" message or a multi-line reply terminated by "END". But, curently we silently accept the "version n" command wih no response. This causes clients like OpenVPN-GUI lock-up if version command is used, waiting for ever for a reply. Fix this by adding a SUCCESS response if client version is set to a value >=3D 4. As the highest client version in use until now is 3, this should not affect any work-arounds in existing clients. ERROR response is generated if the version parameter is null which never happens in practice. Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a Signed-off-by: Selva Nair Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1528 Message-Id: <20260224213036.31845-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35= 782.html Signed-off-by: Gert Doering --- M doc/management-notes.txt M src/openvpn/manage.c 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/28/1528/6 diff --git a/doc/management-notes.txt b/doc/management-notes.txt index 1a5c311..86b74f3 100644 --- a/doc/management-notes.txt +++ b/doc/management-notes.txt @@ -492,6 +492,10 @@ version 2 -- Change management version of client to 2 (default =3D 1) version -- Show the version of OpenVPN and its Management Interface +Note: Until version 3, no response was generated when client sets its +version. This was fixed starting version 4: clients should expect +"SUCCESS: .. " message only when setting the version to >=3D 4. + COMMAND -- auth-retry --------------------- diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index 37ae6b3..03ff5b3 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -1333,6 +1333,15 @@ if (version) { man->connection.client_version =3D atoi(version); + /* Prior to version 3, we missed to respond to this command. Ackno= wledge only if version >=3D 4 */ + if (man->connection.client_version >=3D 4) + { + msg(M_CLIENT, "SUCCESS: Management client version set to %d", = man->connection.client_version); + } + } + else + { + msg(M_CLIENT, "ERROR: Invalid value specified for management clien= t version"); } } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a Gerrit-Change-Number: 1528 Gerrit-PatchSet: 6 Gerrit-Owner: selvanair Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --d3mQjhQH9ps= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #6 to the change originally created by selvanair.<= /p>

Vi= ew Change

The following approvals got outdated and were removed: Code-Review+2 by cron2

Fixup version command on management=
 interface

All commands to the management interface are supposed to = be
responded with either a one-line "SUCCESS:/ERROR:" message<= br>or a multi-line reply terminated by "END". But, curently wesilently accept the "version n" command wih no response. Thiscauses clients like OpenVPN-GUI lock-up if version command is
used, wai= ting for ever for a reply.

Fix this by adding a SUCCESS response if = client version
is set to a value >=3D 4. As the highest client versio= n in use
until now is 3, this should not affect any work-arounds in
e= xisting clients. ERROR response is generated if the version
parameter is= null which never happens in practice.

Change-Id: I76dc80a9d9b29e401= b7bbd59e0c46baf751d2e4a
Signed-off-by: Selva Nair <selva.nair@...1354...= ..>
Acked-by: Gert Doering <gert@...1296...>
Gerrit URL: htt= ps://gerrit.openvpn.net/c/openvpn/+/1528
Message-Id: <20260224213036.= 31845-1-gert@...1296...>
URL: https://www.mail-archive.com/openvpn-de= vel@lists.sourceforge.net/msg35782.html
Signed-off-by: Gert Doering <= gert@...1296...>
---
M doc/management-notes.txt
M src/openvpn/m= anage.c
2 files changed, 13 insertions(+), 0 deletions(-)

<= pre class=3D"blocks" style=3D"font-family: monospace,monospace; white-space= : pre-wrap;">git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/2= 8/1528/6
diff --git a/doc/management-notes.txt b/doc/management-not=
es.txt
index 1a5c311..86b74f3 100644
--- a/= doc/management-notes.txt
+++ b/doc/management-notes.txt
@@ -492,6 +492,10 @@
version 2 -- Change m= anagement version of client to 2 (default =3D 1)
version= -- Show the version of OpenVPN and its Management Interface
<= span>

+Note: Until v= ersion 3, no response was generated when client sets its
+version. This was fixed starting versi= on 4: clients should expect
+"SUCCESS: .. " message only when setting the version to &= gt;=3D 4.
+ COMMAND -- auth-retry
---------------------=

diff --git a/src/openvpn/manage.c b/src/openvpn= /manage.c
index 37ae6b3..03ff5b3 100644
---= a/src/openvpn/manage.c
+++ b/src/openvpn/manage.c@@ -1333,6 +1333,15 @@
if (version)
= {
man->connection.client_version =3D= atoi(version);
+ = /* Prior to version 3, we missed to respond to this command. Acknowledg= e only if version >=3D 4 */
+ if (man->connection.client_version >=3D 4)<= br>+ {
+ msg(M_CLIENT, "SUCCE= SS: Management client version set to %d", man->connection.client_ve= rsion);
+ }
+ }
+ else
+ {
+ msg(M_CLIENT, "ERROR: Invalid value specified fo= r management client version");
}
= }


To view, visit change 1528= . To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c= 46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 6
Gerrit-Owner: selvanair <selva.nair@...1354...= ..>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --d3mQjhQH9ps=--