From: "cron2 (Code Review)" Date: Wed, 25 Feb 2026 08:42:57 +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="mRAbyGGLDYQ="; 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 Cc: flichtenheld , plaisthos , openvpn-devel --mRAbyGGLDYQ= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/15= 28?usp=3Demail ) 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(-) 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: merged 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 --mRAbyGGLDYQ= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 sub= mitted this change.

View Change

Fixup version command on management interface
All commands to the management interface are supposed to be
respond= ed with either a one-line "SUCCESS:/ERROR:" message
or a multi= -line reply terminated by "END". But, curently we
silently acc= ept the "version n" command wih no response. This
causes clien= ts 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 versio= n
is set to a value >=3D 4. As the highest client version in use
u= ntil now is 3, this should not affect any work-arounds in
existing clien= ts. ERROR response is generated if the version
parameter is null which n= ever happens in practice.

Change-Id: I76dc80a9d9b29e401b7bbd59e0c46b= af751d2e4a
Signed-off-by: Selva Nair <selva.nair@...277...>
Ack= ed-by: Gert Doering <gert@...1296...>
Gerrit URL: https://gerrit.o= penvpn.net/c/openvpn/+/1528
Message-Id: <20260224213036.31845-1-gert@= ...1296...>
URL: https://www.mail-archive.com/openvpn-devel@...1885...= rceforge.net/msg35782.html
Signed-off-by: Gert Doering <gert@...1725...= ..>
---
M doc/management-notes.txt
M src/openvpn/manage.c
2 = files changed, 13 insertions(+), 0 deletions(-)

diff --git a/doc/management-notes.txt b/doc/management-notes.txt<=
br>index 1a5c311..86b74f3 100644
--- a/doc/management= -notes.txt
+++ b/doc/management-notes.txt
@= @ -492,6 +492,10 @@
version 2 -- Change management vers= ion of client to 2 (default =3D 1)
version -- Show th= e version of OpenVPN and its Management Interface
<= br>+Note: Until version 3, no r= esponse 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.
+
COMMAN= D -- 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
@@ -13= 33,6 +1333,15 @@
if (version)
{
man->connection.client_version =3D atoi(version)= ;
+ /* Prior t= o version 3, we missed to respond to this command. Acknowledge only if vers= ion >=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 c= lient version");
}
}
<= span>


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

Gerrit-MessageType: merged
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>
= --mRAbyGGLDYQ=--