From: "ordex (Code Review)" Date: Sat, 26 Jul 2025 00:01:20 +0000 References: Reply-To: antonio@...2726..., 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="C8Y9Ndn/T4E="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: dco: drop client prefix after DCO PEER_FLOAT notification List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --C8Y9Ndn/T4E= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1116?usp=3Demail to review the following change. Change subject: dco: drop client prefix after DCO PEER_FLOAT notification ...................................................................... dco: drop client prefix after DCO PEER_FLOAT notification multi_process_float() will possibly float a client and also generate and set its new prefix. However, after processing the PEER_FLOAT_NTF message, we were not clearing the prefix, thus effectivly making the generated prefix permanent until the next set_prefix() call. Clear the prefix right after calling multi_process_float() to avoid printing messages with the wrong prefix. Github: closes OpenVPN/openvpn#799 Change-Id: I1ad5df0f6785ffe9becd9f83329a9335d1a36f24 Signed-off-by: Antonio Quartulli --- M src/openvpn/multi.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/16/1116/1 diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index d23aee7..32331d7 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3417,6 +3417,10 @@ &m->top.c2.from.dest, (struct sockaddr *)&dco->dco_float= _peer_ss); multi_process_float(m, mi, mi->context.c2.link_sockets[0]); + /* multi_process_float() generated and set a new peer prefix, = but we + * don't to keep it at this point. + */ + clear_prefix(); CLEAR(dco->dco_float_peer_ss); } #endif /* if defined(TARGET_LINUX) || defined(TARGET_WIN32) */ -- 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: 1 Gerrit-Owner: ordex Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-MessageType: newchange --C8Y9Ndn/T4E= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos.

ordex would like plaisthos and flichtenheld to review t= his change.

V= iew Change

dco: drop client prefix after DCO PEER_FLOAT notification
multi_process_float() will possibly float a client and
also generat= e and set its new prefix.

However, after processing the PEER_FLOAT_N= TF message, we
were not clearing the prefix, thus effectivly making
t= he generated prefix permanent until the next set_prefix()
call.

C= lear the prefix right after calling multi_process_float()
to avoid print= ing messages with the wrong prefix.

Github: closes OpenVPN/openvpn#7= 99
Change-Id: I1ad5df0f6785ffe9becd9f83329a9335d1a36f24
Signed-off-by= : Antonio Quartulli <antonio@...2726...>
---
M src/openvpn/mult= i.c
1 file changed, 4 insertions(+), 0 deletions(-)

git pull s=
sh://gerrit.openvpn.net:29418/openvpn refs/changes/16/1116/1
diff -=
-git a/src/openvpn/multi.c b/src/openvpn/multi.c
index d23a= ee7..32331d7 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -3417,6 +3417,10 @@<= br> &m->top.c2.from.de= st,
(struct sockad= dr *)&dco->dco_float_peer_ss);
multi_pr= ocess_float(m, mi, mi->context.c2.link_sockets[0]);
+ /* multi_process_float() gen= erated and set a new peer prefix, but we
+ * don't to keep it at this point.

+ */<= br>+ clear_prefix();=
CLEAR(dco->dco_float_peer_ss);
<= span> }
#endif /* if defined(TARGET_LINUX) || defi= ned(TARGET_WIN32) */

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: 1
Gerrit-Owner: ordex <antonio@...2726...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newchange
--C8Y9Ndn/T4E=--