From: "selvanair (Code Review)" Date: Tue, 24 Feb 2026 20:12:29 +0000 In-Reply-To: References: Reply-To: selva.nair@...277..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., gert@...1296... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="qi/4FFAKsf4="; 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: plaisthos , flichtenheld Cc: openvpn-devel --qi/4FFAKsf4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos, selvanair. Hello flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=3Demail to look at the new patch set (#4). The following approvals got outdated and were removed: Code-Review+2 by flichtenheld The change is no longer submittable: Code-Review and checks~ChecksSubmitRul= e are unsatisfied now. 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 --- 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/4 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"); } } --=20 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: 4 Gerrit-Owner: selvanair Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: cron2 Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Attention: selvanair --qi/4FFAKsf4= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld, plaisthos, selvanair.

selvanair uploaded patch set #4 to this change.

<= a href=3D"http://gerrit.openvpn.net/c/openvpn/+/1528?usp=3Demail">View Chan= ge

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

The change is no longer submittable: Co= de-Review and checks~ChecksSubmitRule are unsatisfied now.

Fixup version command on management interface

All commands to the m= anagement 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&qu= ot; command wih no response. This
causes clients like OpenVPN-GUI lock-u= p if version command is
used, waiting for ever for a reply.

Fix t= his 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 gene= rated if the version
parameter is null which never happens in practice.<= br>
Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a
Signed-off-b= y: Selva Nair <selva.nair@...277...>
---
M doc/management-notes= .txt
M src/openvpn/manage.c
2 files changed, 13 insertions(+), 0 dele= tions(-)

git pull ssh://gerrit.openvpn.net:29418=
/openvpn refs/changes/28/1528/4
diff --git a/doc/management-notes.t=
xt b/doc/management-notes.txt
index 1a5c311..86b74f3 100644=
--- a/doc/management-notes.txt
+++ b/doc/m= anagement-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 Managemen= t Interface

+Note: Until version 3, no response was generated when client sets= its
+version. This w= as fixed starting version 4: clients should expect
+"SUCCESS: .. " message only when s= etting the version to >=3D 4.
+
COMMAND -- auth-retry
-----= ----------------

diff --git a/src/openvpn= /manage.c b/src/openvpn/manage.c
index 37ae6b3..03ff5b3 100= 644
--- a/src/openvpn/manage.c
+++ b/src/op= envpn/manage.c
@@ -1333,6 +1333,15 @@
= if (version)
{
man->connec= tion.client_version =3D atoi(version);
+ /* Prior to version 3, we missed to respond to t= his command. Acknowledge only if version >=3D 4 */
+ if (man->connection.client_ver= sion >=3D 4)
+ = {
+ ms= g(M_CLIENT, "SUCCESS: Management client version set to %d", man-&= gt;connection.client_version);
+ }
= + }
+ else
+ {
+ msg(M_CLIENT, "ERROR: Inv= alid value specified for management client version");
= }
}


To view, visit change 1528. To unsubscribe, or for help writing mail filte= rs, visit settin= gs.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c= 46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 4
Gerrit-Owner: selvanair <selva.nair@...1354...= ..>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: cron2 <gert@...1296...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: selvanair <selva.nair@...493...= 277...>
= --qi/4FFAKsf4=--