From: "flichtenheld (Code Review)" Date: Mon, 3 Nov 2025 11:53:37 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <07433e7201e0b863db315067233cff56cc8d973a-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="ohcXx0WgRJs="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: manage: Correctly handle port 65535 in man_kill List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --ohcXx0WgRJs= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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/+/1341?usp=3Demail to review the following change. Change subject: manage: Correctly handle port 65535 in man_kill ...................................................................... manage: Correctly handle port 65535 in man_kill Commit c66d433111c958c42cc98f4ba12d3cfc1bd5b3b4 introduced an off-by-one when changing a literal to a constant. Fixes: #887 Change-Id: I19373408a82332d7b2e5c634e5509c8be3727b5a Signed-off-by: Frank Lichtenheld --- M src/openvpn/manage.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/41/1341/1 diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index e46b5f2..6efa100 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -612,7 +612,7 @@ : (streq(p1, "udp")) ? PROTO_UDP : PROTO_NONE; - if ((port > 0 && port < UINT16_MAX) && (proto !=3D PROTO_N= ONE)) + if ((port > 0 && port <=3D UINT16_MAX) && (proto !=3D PROT= O_NONE)) { n_killed =3D (*man->persist.callback.kill_by_addr)(man= ->persist.callback.arg, addr,= (uint16_t)port, proto); -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1341?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I19373408a82332d7b2e5c634e5509c8be3727b5a Gerrit-Change-Number: 1341 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --ohcXx0WgRJs= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

V= iew Change

manage: Correctly handle port 65535 in man_=
kill

Commit c66d433111c958c42cc98f4ba12d3cfc1bd5b3b4 introduced
a= n off-by-one when changing a literal to a constant.

Fixes: #887
C= hange-Id: I19373408a82332d7b2e5c634e5509c8be3727b5a
Signed-off-by: Frank= Lichtenheld <frank@...2641...>
---
M src/openvpn/manage.c
1= file changed, 1 insertion(+), 1 deletion(-)

git=
 pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/41/1341/1
diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
i= ndex e46b5f2..6efa100 100644
--- a/src/openvpn/manage.c
+++ b/src/openvpn/manage.c
@@ -612,7 +612,7 @@=
: (streq(p1, "= udp")) ? PROTO_UDP
= : PROTO_NONE;

- if ((port > 0 &&a= mp; port < UINT16_MAX) && (proto !=3D PROTO_NONE))
+ if ((port > 0 = && port <=3D UINT16_MAX) && (proto !=3D PROTO_NONE))
{
n_kill= ed =3D (*man->persist.callback.kill_by_addr)(man->persist.callback.ar= g,
= addr, (uint16_t)port, proto);

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

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I19373408a82332d7b2e5c634e55= 09c8be3727b5a
Gerrit-Change-Number: 1341
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
= --ohcXx0WgRJs=--