Change in openvpn[master]: Fixup version command on management interface
A message that is not in the archive (sent off-list or not yet received): gerrit.1771205254000.I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
to review the following change.
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/ERROR response.
---
M src/openvpn/manage.c
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/28/1528/1
src/openvpn/manage.c +5 -0
@@ -1333,6 +1333,11 @@if (version) { man->connection.client_version =atoi (version); +msg (M_CLIENT ,"SUCCESS: Management client version set to %d" ,atoi (version)); + } +else + { +msg (M_CLIENT ,"ERROR: Invalid value sepcified for management client version" ); } }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 1
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
to look at the new patch set (#2).
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/ERROR response.
---
M src/openvpn/manage.c
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/28/1528/2
src/openvpn/manage.c +5 -0
@@ -1333,6 +1333,11 @@if (version) { man->connection.client_version =atoi (version); +msg (M_CLIENT ,"SUCCESS: Management client version set to %d" ,atoi (version)); + } +else + { +msg (M_CLIENT ,"ERROR: Invalid value specified for management client version" ); } }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 2
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: plaisthos.
selvanair has posted comments on this change by selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email )
Change subject: Fixup version command on management interface
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
If any client/UI/GUI is already using this command via some internal work-around, this patch may potentially break it depending on how robust the work-around is. Alternative is to respond only if the management-client version being set is >= 3. Currently documented max version is 2.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 2
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Comment-Date: Mon, 16 Feb 2026 01:35:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: plaisthos, selvanair.
flichtenheld has posted comments on this change by selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email )
Change subject: Fixup version command on management interface
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
File src/openvpn/manage.c:
http://gerrit.openvpn.net/c/openvpn/+/1528/comment/396de3ef_ba7ee49b?usp=email :
PS2, Line 1336: msg(M_CLIENT, "SUCCESS: Management client version set to %d", atoi(version));
Really shouldn't call atoi twice but instead use the return value.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 2
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: selvanair <[email protected]...>
Gerrit-Comment-Date: Mon, 16 Feb 2026 12:52:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
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=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review-1 by flichtenheld
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/ERROR response.
---
M src/openvpn/manage.c
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/28/1528/3
src/openvpn/manage.c +5 -0
@@ -1333,6 +1333,11 @@if (version) { man->connection.client_version =atoi (version); +msg (M_CLIENT ,"SUCCESS: Management client version set to %d" , man->connection.client_version); + } +else + { +msg (M_CLIENT ,"ERROR: Invalid value specified for management client version" ); } }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 3
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: selvanair <[email protected]...>
Attention is currently required from: flichtenheld, plaisthos.
selvanair has posted comments on this change by selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email )
Change subject: Fixup version command on management interface
......................................................................
Patch Set 3:
(1 comment)
File src/openvpn/manage.c:
http://gerrit.openvpn.net/c/openvpn/+/1528/comment/c384acb2_fca0e0f6?usp=email :
PS2, Line 1336: msg(M_CLIENT, "SUCCESS: Management client version set to %d", atoi(version));
Quoted 1 line
Really shouldn't call
atoitwice but instead use the return value.
Done
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 3
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 16 Feb 2026 19:33:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: flichtenheld <[email protected]...>
Attention is currently required from: plaisthos, selvanair.
flichtenheld has posted comments on this change by selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email )
Change subject: Fixup version command on management interface
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 3
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: selvanair <[email protected]...>
Gerrit-Comment-Date: Tue, 17 Feb 2026 13:55:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
PATCH v3 1/1 Fixup version command on management interface
In reply to a message not in the archiveFrom: Selva Nair <[email protected]...>
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/ERROR response.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1528
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1528
This mail reflects revision 3 of this Change.
Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <[email protected]...>
src/openvpn/manage.c +5 -0
@@ -1333,6 +1333,11 @@if (version) { man->connection.client_version =atoi (version); +msg (M_CLIENT ,"SUCCESS: Management client version set to %d" , man->connection.client_version); + } +else + { +msg (M_CLIENT ,"ERROR: Invalid value specified for management client version" ); } }
Attention is currently required from: plaisthos, selvanair.
cron2 has posted comments on this change by selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email )
Change subject: Fixup version command on management interface
......................................................................
Patch Set 3:
(2 comments)
Patchset:
PS2:
Quoted 1 line
If any client/UI/GUI is already using this command via some internal work-around, this patch may pot […]
I think we should keep v1 + v2 behaviour as it is, and fix it for v3 (+document this) - which is, from what I saw on the list, what we'll see "soonish" anyway for the no-password enhancement.
Patchset:
PS3:
meh, gerrit tricked me. I answered on the "to respond only if ... >= 3" thought, but forgot to "send it for real".
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 3
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: cron2 <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: selvanair <[email protected]...>
Gerrit-Comment-Date: Tue, 24 Feb 2026 18:14:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: selvanair <[email protected]...>
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=email
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~ChecksSubmitRule 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 >= 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.
---
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
doc/management-notes.txt +4 -0
@@ -492,6 +492,10 @@ version 2 -- Change management version of client to 2 (default = 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 >= 4. + COMMAND -- auth-retry ---------------------
src/openvpn/manage.c +9 -0
@@ -1333,6 +1333,15 @@if (version) { man->connection.client_version =atoi (version); +/* Prior to version 3, we missed to respond to this command. Acknowledge only if version >= 4 */ +if (man->connection.client_version >=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 client version" ); } }
Signature · 17 lines
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a Gerrit-Change-Number: 1528 Gerrit-PatchSet: 4 Gerrit-Owner: selvanair <[email protected]...> Gerrit-Reviewer: flichtenheld <[email protected]...> Gerrit-Reviewer: plaisthos <[email protected]...> Gerrit-CC: cron2 <[email protected]...> Gerrit-CC: openvpn-devel <[email protected]> Gerrit-Attention: plaisthos <[email protected]...> Gerrit-Attention: flichtenheld <[email protected]...> Gerrit-Attention: selvanair <[email protected]...>
Attention is currently required from: cron2, flichtenheld, plaisthos.
selvanair has posted comments on this change by selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email )
Change subject: Fixup version command on management interface
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3:
Quoted 1 line
meh, gerrit tricked me. I answered on the "to respond only if ... […]
I do that all the time -- the other day deleted a dozen old comments that never saw the light of day...
Anyway, I found "commit 8be444df8" had upped the latest client version to 3, so enabling this for >= 4. We really need a way to document client versions -- right now one has to just know.
What about something like a private enum in manage.c with {CLIENT_VERSION_BASE = 1, CLIENT_VERSION_PKSIGN = 2, ... } and then use those like "if (client_version >= CLIENT_VERSION_PKSIGN)" etc? As a separate patch of course. Or, is there a better way?
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 3
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: cron2 <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Tue, 24 Feb 2026 20:14:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: cron2 <[email protected]...>
Attention is currently required from: flichtenheld, plaisthos, selvanair.
cron2 has posted comments on this change by selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email )
Change subject: Fixup version command on management interface
......................................................................
Patch Set 5: Code-Review+2
(1 comment)
Patchset:
PS3:
Quoted 1 line
I do that all the time -- the other day deleted a dozen old comments that never saw the light of day […]
yes, please :-) (documenting + enum)
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 5
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: selvanair <[email protected]...>
Gerrit-Comment-Date: Tue, 24 Feb 2026 21:29:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: cron2 <[email protected]...>
Comment-In-Reply-To: selvanair <[email protected]...>
PATCH v5 1/1 Fixup version command on management interface
In reply to a message not in the archiveFrom: Selva Nair <[email protected]...>
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 >= 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.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1528
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1528
This mail reflects revision 5 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
doc/management-notes.txt +4 -0
@@ -492,6 +492,10 @@ version 2 -- Change management version of client to 2 (default = 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 >= 4. + COMMAND -- auth-retry ---------------------
src/openvpn/manage.c +9 -0
@@ -1333,6 +1333,15 @@if (version) { man->connection.client_version =atoi (version); +/* Prior to version 3, we missed to respond to this command. Acknowledge only if version >= 4 */ +if (man->connection.client_version >=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 client version" ); } }
[Openvpn-devel] [PATCH applied] Re: Fixup version command on management interface
Thanks for that. As discussed, we keep full compatibility ("lack of SUCCESS response") for up to v3, and document this.
I'm looking forward to a followup patch that documents v1, v2, v3 and v4...
Your patch has been applied to the master and release/2.7 branch.
I do not foresee new mgmt features being added to 2.6.x, so I don't think we need this in release/2.6 (but if it is needed, we can always cherrypick it "on demand")
commit adc0febaeac0d83246dbd2cc77b2a5d80e41741e (master) commit d88e9023930a74cebb8ceab2b91587221675846c (release/2.7)
Author: Selva Nair Date: Tue Feb 24 22:30:30 2026 +0100
Fixup version command on management interface
Signed-off-by: Selva Nair <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1528
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35782.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#6) to the change originally created by selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email )
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 >= 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.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1528
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35782.html
---
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
doc/management-notes.txt +4 -0
@@ -492,6 +492,10 @@ version 2 -- Change management version of client to 2 (default = 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 >= 4. + COMMAND -- auth-retry ---------------------
src/openvpn/manage.c +9 -0
@@ -1333,6 +1333,15 @@if (version) { man->connection.client_version =atoi (version); +/* Prior to version 3, we missed to respond to this command. Acknowledge only if version >= 4 */ +if (man->connection.client_version >=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 client version" ); } }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 6
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email )
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 >= 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.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1528
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35782.html
---
M doc/management-notes.txt
M src/openvpn/manage.c
2 files changed, 13 insertions(+), 0 deletions(-)
doc/management-notes.txt +4 -0
@@ -492,6 +492,10 @@ version 2 -- Change management version of client to 2 (default = 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 >= 4. + COMMAND -- auth-retry ---------------------
src/openvpn/manage.c +9 -0
@@ -1333,6 +1333,15 @@if (version) { man->connection.client_version =atoi (version); +/* Prior to version 3, we missed to respond to this command. Acknowledge only if version >= 4 */ +if (man->connection.client_version >=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 client version" ); } }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1528?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I76dc80a9d9b29e401b7bbd59e0c46baf751d2e4a
Gerrit-Change-Number: 1528
Gerrit-PatchSet: 6
Gerrit-Owner: selvanair <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>