From: "cron2 (Code Review)" Date: Fri, 7 Nov 2025 16:32:09 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., 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="yhisPcAHhYU="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: FreeBSD DCO: repair incoming 'delete peer' notifications in p2p clien... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --yhisPcAHhYU= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1353?usp=3Demail to look at the new patch set (#4). The following approvals got outdated and were removed: Code-Review+2 by flichtenheld Change subject: FreeBSD DCO: repair incoming 'delete peer' notifications in= p2p client mode ...................................................................... FreeBSD DCO: repair incoming 'delete peer' notifications in p2p client mode commit 4a48841da2 introduced a workaround for spurious DCO notifications "with no useful content" on Linux - namely, ignoring dco_message_type=3D=3D0 in forward.c, process_incoming_dco(), "because Linux has no message type 0 anyway". Each DCO platform uses its own enum for these notification messages *inside* OpenVPN (which might not have the best design decision ever), and FreeBSD had OVPN_CMD_DEL_PEER in the enum on "position 0"... Fix by changing the enum to start with 1. Tested with DEL_PEER in p2p client and DEL_PEER & FLOAT in p2mp server mode. v2: introduce OVPN_CMD_NO_MESSAGE in position 0, and a comment explaining why. A future commit can then clean up forward.c and dco_linux.c to use the constant, and not "magic 0 which happens to be in there after CLEAR()". Github: fixes OpenVPN/openvpn#881 Change-Id: I991d6053776efed771bc1a3880acb80b55959cbc Signed-off-by: Gert Doering Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1353 Message-Id: <20251107141333.12056-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34= 237.html Signed-off-by: Gert Doering --- M src/openvpn/dco_freebsd.h 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/53/1353/4 diff --git a/src/openvpn/dco_freebsd.h b/src/openvpn/dco_freebsd.h index 0797b82..5e2a552 100644 --- a/src/openvpn/dco_freebsd.h +++ b/src/openvpn/dco_freebsd.h @@ -33,6 +33,8 @@ enum ovpn_message_type_t { + /* message type #0 is treated as magic number by process_incoming_dco(= ) */ + OVPN_CMD_NO_MESSAGE =3D 0, OVPN_CMD_DEL_PEER, OVPN_CMD_PACKET, OVPN_CMD_SWAP_KEYS, -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1353?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: I991d6053776efed771bc1a3880acb80b55959cbc Gerrit-Change-Number: 1353 Gerrit-PatchSet: 4 Gerrit-Owner: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --yhisPcAHhYU= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #4 to this change.

View Change

The followi= ng approvals got outdated and were removed: Code-Review+2 by flichtenheld

FreeBSD DCO: repair incoming=
 'delete peer' notifications in p2p client mode

commit 4a488= 41da2 introduced a workaround for spurious DCO notifications
"with = no useful content" on Linux - namely, ignoring dco_message_type=3D=3D0=
in forward.c, process_incoming_dco(), "because Linux has no messag= e
type 0 anyway".

Each DCO platform uses its own enum for th= ese notification messages
*inside* OpenVPN (which might not have the bes= t design decision ever),
and FreeBSD had OVPN_CMD_DEL_PEER in the enum o= n "position 0"...

Fix by changing the enum to start with 1= . Tested with DEL_PEER in p2p
client and DEL_PEER & FLOAT in p2mp s= erver mode.

v2:
introduce OVPN_CMD_NO_MESSAGE in position 0, an= d a comment explaining why.
A future commit can then clean up forward.= c and dco_linux.c to use the
constant, and not "magic 0 which hap= pens to be in there after CLEAR()".

Github: fixes OpenVPN/openv= pn#881

Change-Id: I991d6053776efed771bc1a3880acb80b55959cbc
Signe= d-off-by: Gert Doering <gert@...1296...>
Acked-by: Frank Lichtenhe= ld <frank@...2641...>
Gerrit URL: https://gerrit.openvpn.net/c/ope= nvpn/+/1353
Message-Id: <20251107141333.12056-1-gert@...1296...>URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg= 34237.html
Signed-off-by: Gert Doering <gert@...1296...>
---M src/openvpn/dco_freebsd.h
1 file changed, 2 insertions(+), 0 deletion= s(-)

git pull ssh://gerrit.openvpn.net:29418/ope=
nvpn refs/changes/53/1353/4
diff --git a/src/openvpn/dco_freebsd.h =
b/src/openvpn/dco_freebsd.h
index 0797b82..5e2a552 100644
--- a/src/openvpn/dco_freebsd.h
+++ b/src/op= envpn/dco_freebsd.h
@@ -33,6 +33,8 @@

enum ovpn_message_type_t
{
+ /* message type #0 is treated as = magic number by process_incoming_dco() */
+ OVPN_CMD_NO_MESSAGE =3D 0,
O= VPN_CMD_DEL_PEER,
OVPN_CMD_PACKET,
= OVPN_CMD_SWAP_KEYS,

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

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I991d6053776efed771bc1a3880a= cb80b55959cbc
Gerrit-Change-Number: 1353
Gerrit-PatchSet: 4
Gerrit-Owner: 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>
= --yhisPcAHhYU=--