From: "ralf_lici (Code Review)" Date: Thu, 16 Oct 2025 15:49:13 +0000 References: Reply-To: ralf@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <5f8794ad34166e1d51d46be366844ecbceedd679-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="xq3gf88MqbM="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: dco: disable DCO when using --reneg-bytes/pkts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --xq3gf88MqbM= 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/+/1280?usp=3Demail to review the following change. Change subject: dco: disable DCO when using --reneg-bytes/pkts ...................................................................... dco: disable DCO when using --reneg-bytes/pkts When using --reneg-bytes or --reneg-pkts, openvpn negotiates a new key upon reaching the specified threshold. This implies the usage of per-key counters. DCO, on the other hand, provides only global statistics, making it currently impossible to track when renegotiation should occur. To avoid introducing unnecessary complexity into DCO, it is disabled when either of these options is specified. Instead, the automatic key renegotiation mechanism is preferred, as it provides a more modern and streamlined approach. Change-Id: I7b718a14b81e3759398e7a52fe151102494cc821 Signed-off-by: Ralf Lici --- M src/openvpn/dco.c 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/80/1280/1 diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index 8fb4662..59f6f5a 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -424,6 +424,13 @@ return false; } + if (o->renegotiate_bytes > 0 || o->renegotiate_packets) + { + msg(msglevel, "Note: '--reneg-bytes' and '--reneg-pkts' are not su= pported by DCO, " + "disabling data channel offload."); + return false; + } + /* now that all options have been confirmed to be supported, check * if DCO is truly available on the system */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1280?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: I7b718a14b81e3759398e7a52fe151102494cc821 Gerrit-Change-Number: 1280 Gerrit-PatchSet: 1 Gerrit-Owner: ralf_lici Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld --xq3gf88MqbM= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld, plaisthos.

ralf_lici would like plaisthos and flichtenheld to review this change.

V= iew Change

dco: disable DCO when using --reneg-bytes/p=
kts

When using --reneg-bytes or --reneg-pkts, openvpn negotiates a n= ew key
upon reaching the specified threshold. This implies the usage of = per-key
counters. DCO, on the other hand, provides only global statistic= s,
making it currently impossible to track when renegotiation should occ= ur.

To avoid introducing unnecessary complexity into DCO, it is disa= bled
when either of these options is specified. Instead, the automatic k= ey
renegotiation mechanism is preferred, as it provides a more modern an= d
streamlined approach.

Change-Id: I7b718a14b81e3759398e7a52fe151= 102494cc821
Signed-off-by: Ralf Lici <ralf@...2726...>
---
M= src/openvpn/dco.c
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/=
changes/80/1280/1
diff --git a/src/openvpn/dco.c b/src/openvpn/dco.=
c
index 8fb4662..59f6f5a 100644
--- a/src/o= penvpn/dco.c
+++ b/src/openvpn/dco.c
@@ -42= 4,6 +424,13 @@
return false;
= }

+= if (o->renegotiate_bytes > 0 || o->renegotiate_packets)=
+ {
+ msg(msglevel, "Note: '-= -reneg-bytes' and '--reneg-pkts' are not supported by DCO, &quo= t;
+ "= ;disabling data channel offload.");
+ return false;
+ }
+
/* now that all options have been confirmed = to be supported, check
* if DCO is truly available on= the system
*/

To= view, visit change 1280. To unsubscribe, or for help writing mail filters, vis= it settings.=

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7b718a14b81e3759398e7a52fe1= 51102494cc821
Gerrit-Change-Number: 1280
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <ralf@...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...>
= --xq3gf88MqbM=--