From: "cron2 (Code Review)" Date: Fri, 12 Sep 2025 17:00:35 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., antonio@...2726... Message-ID: <694533f0583c4c25c009dafd89d4f231fa3a222f-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="1MvoM4YTBW8="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: dco: add standard mi prefix handling to multi_process_incoming_dco() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --1MvoM4YTBW8= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#4) to the change originally created by= ordex. ( http://gerrit.openvpn.net/c/openvpn/+/1116?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: dco: add standard mi prefix handling to multi_process_incom= ing_dco() ...................................................................... dco: add standard mi prefix handling to multi_process_incoming_dco() Our code generally expects functions that deal with a multi instance to set up a log prefix at the beginning with set_prefix(mi) and clear it at the end with clear_prefix(). Add the calls to multi_process_incoming_dco() in a similar way to what is done for multi_process_incoming_link() - handling "link events" and "dco events" the same, with correct prefix in the function and no leftover prefix afterwards. Github: closes OpenVPN/openvpn#799 Change-Id: I1ad5df0f6785ffe9becd9f83329a9335d1a36f24 Signed-off-by: Antonio Quartulli Signed-off-by: Gert Doering Acked-by: Gert Doering Message-Id: <20250911201222.25382-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32= 859.html URL: https://gerrit.openvpn.net/c/openvpn/+/1116 Signed-off-by: Gert Doering --- M src/openvpn/multi.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/16/1116/4 diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 7db4eda..6e4cc42 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3294,6 +3294,7 @@ if ((peer_id < m->max_clients) && (m->instances[peer_id])) { mi =3D m->instances[peer_id]; + set_prefix(mi); if (dco->dco_message_type =3D=3D OVPN_CMD_DEL_PEER) { process_incoming_del_peer(m, mi, dco); @@ -3311,6 +3312,7 @@ { tls_session_soft_reset(mi->context.c2.tls_multi); } + clear_prefix(); } else { -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1116?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I1ad5df0f6785ffe9becd9f83329a9335d1a36f24 Gerrit-Change-Number: 1116 Gerrit-PatchSet: 4 Gerrit-Owner: ordex Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --1MvoM4YTBW8= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #4 to the change originally cr= eated by ordex.

View Change

The following approvals got outdated an= d were removed: Code-Review+2 by cron2

dco: add standard mi prefix handling to multi_proces=
s_incoming_dco()

Our code generally expects functions that deal with= a multi instance
to set up a log prefix at the beginning with set_prefi= x(mi) and clear
it at the end with clear_prefix().

Add the calls = to multi_process_incoming_dco() in a similar way to
what is done for mul= ti_process_incoming_link() - handling "link
events" and "= dco events" the same, with correct prefix in the
function and no le= ftover prefix afterwards.

Github: closes OpenVPN/openvpn#799
Chan= ge-Id: I1ad5df0f6785ffe9becd9f83329a9335d1a36f24
Signed-off-by: Antonio = Quartulli <antonio@...2726...>
Signed-off-by: Gert Doering <ger= t@...1296...>
Acked-by: Gert Doering <gert@...1296...>
Messa= ge-Id: <20250911201222.25382-1-gert@...1296...>
URL: https://www.m= ail-archive.com/openvpn-devel@lists.sourceforge.net/msg32859.html
URL: h= ttps://gerrit.openvpn.net/c/openvpn/+/1116
Signed-off-by: Gert Doering &= lt;gert@...1296...>
---
M src/openvpn/multi.c
1 file changed, 2= insertions(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:=
29418/openvpn refs/changes/16/1116/4
diff --git a/src/openvpn/multi=
.c b/src/openvpn/multi.c
index 7db4eda..6e4cc42 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/mul= ti.c
@@ -3294,6 +3294,7 @@
if ((peer_i= d < m->max_clients) && (m->instances[peer_id]))
= {
mi =3D m->instances[peer_id];
+ set_prefix(mi);<= /span>
if (dco->dco_message_type =3D=3D OVPN_CMD_DEL_P= EER)
{
process_incomi= ng_del_peer(m, mi, dco);
@@ -3311,6 +3312,7 @@
{

tls_session_soft_reset(mi->c= ontext.c2.tls_multi);
}
+ clear_prefix();
}=
else
{

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

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1ad5df0f6785ffe9becd9f83329= a9335d1a36f24
Gerrit-Change-Number: 1116
Gerrit-PatchSet: 4
Gerrit-Owner: ordex <antonio@...2726...>=
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>
Gerrit-MessageType: newpatchset
--1MvoM4YTBW8=--