From: "cron2 (Code Review)" Date: Fri, 17 Oct 2025 19:30:31 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, ralf@...2726..., frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="Rtli/egRl4k="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: options: warn and ignore --reneg-bytes/pkts when DCO is enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ralf_lici Cc: plaisthos , flichtenheld , openvpn-devel --Rtli/egRl4k= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/12= 80?usp=3Demail ) Change subject: options: warn and ignore --reneg-bytes/pkts when DCO is ena= bled ...................................................................... options: warn and ignore --reneg-bytes/pkts when DCO is enabled Thresholds specified by --reneg-bytes and --reneg-pkts cannot be enforced when DCO is enabled, as it only provides global statistics. Rather than adding complexity to support these options, ignore them when DCO is enabled. Print a warning to inform users and update the manpage accordingly. Change-Id: I7b718a14b81e3759398e7a52fe151102494cc821 Signed-off-by: Ralf Lici Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1280 Message-Id: <20251017191612.15642-1-gert@...1296...> URL: https://sourceforge.net/p/openvpn/mailman/message/59248122/ Signed-off-by: Gert Doering --- M doc/man-sections/renegotiation.rst M src/openvpn/options.c 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/doc/man-sections/renegotiation.rst b/doc/man-sections/renegoti= ation.rst index 1e7c340..f5eb90d 100644 --- a/doc/man-sections/renegotiation.rst +++ b/doc/man-sections/renegotiation.rst @@ -19,10 +19,18 @@ the SWEET32 attack vector. For more information see the ``--cipher`` option. + When data channel offload (DCO) is enabled, this option is ignored. DCO + does not support configurable renegotiation thresholds; automatic key + renegotiation mechanisms are sufficient for modern ciphers. + --reneg-pkts n Renegotiate data channel key after **n** packets sent and received (disabled by default). + When data channel offload (DCO) is enabled, this option is ignored. DCO + does not support configurable renegotiation thresholds; automatic key + renegotiation mechanisms are sufficient for modern ciphers. + --reneg-sec args Renegotiate data channel key after at most ``max`` seconds (default :code:`3600`) and at least ``min`` seconds (default is 90% of diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 44f68c7..65c6b3b 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3317,11 +3317,22 @@ dns_options_verify(M_FATAL, &o->dns_options); - if (dco_enabled(o) && o->enable_c2c) + if (dco_enabled(o)) { - msg(M_WARN, "Note: --client-to-client has no effect when using dat= a " - "channel offload: packets are always sent to the VPN " - "interface and then routed based on the system routing= table"); + if (o->enable_c2c) + { + msg(M_WARN, "Note: --client-to-client has no effect when using= data " + "channel offload: packets are always sent to the V= PN " + "interface and then routed based on the system rou= ting table"); + } + + if (o->renegotiate_bytes > 0 || o->renegotiate_packets) + { + msg(M_WARN, "Note: '--reneg-bytes' and '--reneg-pkts' are not = supported " + "by data channel offload; automatic key renegotiat= ion " + "mechanisms are sufficient for modern ciphers. " + "Ignoring these options."); + } } } -- 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: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I7b718a14b81e3759398e7a52fe151102494cc821 Gerrit-Change-Number: 1280 Gerrit-PatchSet: 4 Gerrit-Owner: ralf_lici Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --Rtli/egRl4k= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 sub= mitted this change.

View Change

options: warn and ignore --reneg-bytes/pkts when=
 DCO is enabled

Thresholds specified by --reneg-bytes and --reneg-pk= ts cannot be
enforced when DCO is enabled, as it only provides global st= atistics.

Rather than adding complexity to support these options, ig= nore them when
DCO is enabled. Print a warning to inform users and updat= e the manpage
accordingly.

Change-Id: I7b718a14b81e3759398e7a52fe= 151102494cc821
Signed-off-by: Ralf Lici <ralf@...2726...>
Acked= -by: Gert Doering <gert@...1296...>
Gerrit URL: https://gerrit.ope= nvpn.net/c/openvpn/+/1280
Message-Id: <20251017191612.15642-1-gert@...1186...= .1296...>
URL: https://sourceforge.net/p/openvpn/mailman/message/5924= 8122/
Signed-off-by: Gert Doering <gert@...1296...>
---
M do= c/man-sections/renegotiation.rst
M src/openvpn/options.c
2 files chan= ged, 23 insertions(+), 4 deletions(-)

diff --git a/doc/man-sections/renegotiation.rst b/doc/man-sections/reneg=
otiation.rst
index 1e7c340..f5eb90d 100644
= --- a/doc/man-sections/renegotiation.rst
+++ b/doc/man-sect= ions/renegotiation.rst
@@ -19,10 +19,18 @@
= the SWEET32 attack vector. For more information see the ``--cipher``

option.

+ When data channel offload (DCO) is enabled, this op= tion is ignored. DCO
= + does not support configurable renegotiation thresholds; automatic key
+ renegotiation mechan= isms are sufficient for modern ciphers.
+
--reneg-pkts n
Ren= egotiate data channel key after **n** packets sent and received
<= span> (disabled by default).


+ When data channel offload (DCO) is enabled, = this option is ignored. DCO
+ does not support configurable renegotiation thresholds; automatic= key
+ renegotiation= mechanisms are sufficient for modern ciphers.
+
--reneg-sec args
Renegotiate data channel key after at most ``max`` seconds
= (default :code:`3600`) and at least ``min`` seconds (default is 90= % of
diff --git a/src/openvpn/options.c b/src/openvpn/optio= ns.c
index 44f68c7..65c6b3b 100644
--- a/sr= c/openvpn/options.c
+++ b/src/openvpn/options.c
<= span>@@ -3317,11 +3317,22 @@

dns_opt= ions_verify(M_FATAL, &o->dns_options);

<= span style=3D"color: hsl(0, 100%, 40%);">- if (dco_enabled(o) &&= o->enable_c2c)
+ = if (dco_enabled(o))
{
- msg(M_WARN, "Note: --client-to-client = has no effect when using data "
- "channel offload: packets are alway= s sent to the VPN "
+ if (o->enable_c2c)
+ {
+ msg(M_WARN, "Note: --client-to-client has no effect when= using data "
+ = "channel offload: packets are always sent to th= e VPN "
+ = "interface and then routed based on the system routin= g table");
+ = }
+
+ if (o->renegotiate_byt= es > 0 || o->renegotiate_packets)
+ {
+ msg(M_WARN, "Note: '--reneg-bytes' and &= #39;--reneg-pkts' are not supported "
+ "by data channel of= fload; automatic key renegotiation "
+ "mechanisms are sufficie= nt for modern ciphers. "
+ "Ignoring these options.");

+ }
}
}


<= /pre>

To view, visit change 1280. To unsubscribe, or for help writing mail fi= lters, visit set= tings.

=
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7b718a14b81e3759398e7a52fe1= 51102494cc821
Gerrit-Change-Number: 1280
Gerrit-PatchSet: 4
Gerrit-Owner: ralf_lici <ralf@...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>
= --Rtli/egRl4k=--