From: "ralf_lici (Code Review)" Date: Mon, 19 Jan 2026 18:40:06 +0000 References: Reply-To: ralf@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <3164576bda8f3896cdce0e7d8904a79c43aae9a7-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="3P1LHJn2FX0="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: dco: ignore key transition window logic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --3P1LHJn2FX0= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1479?usp=3Demail to review the following change. Change subject: dco: ignore key transition window logic ...................................................................... dco: ignore key transition window logic Userspace enforces a transition window when moving to a new key, which involves renegotiating the key, installing it as a secondary one, and waiting for an interval before fully adopting it. Although the DCO part of this mechanism is set up in userspace, none of the drivers actually implements it in the kernel. Therefore we ignore the transition window and treat the newly installed key as the primary one, allowing userspace to negotiate, install, and swap it immediately. Change-Id: I3d506725e69c09a9c77d6a9ba71a00e112e7abb6 --- M src/openvpn/dco.c M src/openvpn/forward.c 2 files changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/79/1479/1 diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index 26b8645..a974206 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -78,6 +78,15 @@ multi->dco_keys_installed++; ks->dco_status =3D (slot =3D=3D OVPN_KEY_SLOT_PRIMARY) ? DCO_INSTALLED_PRIMARY : = DCO_INSTALLED_SECONDARY; + + /* TODO: currently none of the DCO drivers support a transition + * window when moving to a new key, so we need this hack to + * trick userspace into thinking that the newly installed key is t= he + * primary one (see dco_update_keys). + * This line should be removed once all drivers implement the + * transition window logic. + */ + ks->auth_deferred_expire =3D now; } return ret; diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index 5004e35..0827d63 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -221,6 +221,8 @@ * on ks->auth_deferred_expire that DCO needs to check that the normal * TLS state engine does not check. So we call the \c check_dco_key_st= atus * function even if tmp_status does not indicate that something has ch= anged. + * + * TODO: this logic is missing on the kernel side. */ check_dco_key_status(c); -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1479?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: I3d506725e69c09a9c77d6a9ba71a00e112e7abb6 Gerrit-Change-Number: 1479 Gerrit-PatchSet: 1 Gerrit-Owner: ralf_lici Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --3P1LHJn2FX0= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

ralf_lici would like plaisthos to review this change.

V= iew Change

dco: ignore key transition window logic
=
Userspace enforces a transition window when moving to a new key, which<= br>involves renegotiating the key, installing it as a secondary one, andwaiting for an interval before fully adopting it. Although the DCO partof this mechanism is set up in userspace, none of the drivers actually
= implements it in the kernel.

Therefore we ignore the transition wind= ow and treat the newly installed
key as the primary one, allowing usersp= ace to negotiate, install, and
swap it immediately.

Change-Id: I3= d506725e69c09a9c77d6a9ba71a00e112e7abb6
---
M src/openvpn/dco.c
M = src/openvpn/forward.c
2 files changed, 11 insertions(+), 0 deletions(-)<= br>
git pull ssh://gerrit.openvpn.net:29418/openvpn =
refs/changes/79/1479/1
diff --git a/src/openvpn/dco.c b/src/openvpn=
/dco.c
index 26b8645..a974206 100644
--- a/= src/openvpn/dco.c
+++ b/src/openvpn/dco.c
@= @ -78,6 +78,15 @@
multi->dco_keys_installed++;<= /span>
ks->dco_status =3D
= (slot =3D=3D OVPN_KEY_SLOT_PRIMARY) ? DCO_INSTALLED_PRIMARY : DCO_INSTALLE= D_SECONDARY;
+=
+ /* TODO: currently= none of the DCO drivers support a transition
+ * window when moving to a new key, so we= need this hack to
+ = * trick userspace into thinking that the newly installed key is the=
+ * primary = one (see dco_update_keys).
+ * This line should be removed once all drivers implement th= e
+ * transit= ion window logic.
+ = */
+ ks= ->auth_deferred_expire =3D now;
}
=
return ret;
diff --git a/src/openvpn/= forward.c b/src/openvpn/forward.c
index 5004e35..0827d63 10= 0644
--- a/src/openvpn/forward.c
+++ b/src/= openvpn/forward.c
@@ -221,6 +221,8 @@
= * on ks->auth_deferred_expire that DCO needs to check that the normal
* TLS state engine does not check. So we call the \c c= heck_dco_key_status
* function even if tmp_status doe= s not indicate that something has changed.
+ *
+ * TODO: this logic is missing on the kernel side.
= */
check_dco_key_status(c);


To view, visit change 1479. To unsubscr= ibe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I3d506725e69c09a9c77d6a9ba71= a00e112e7abb6
Gerrit-Change-Number: 1479
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <ralf@...2726...>= ;
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
= --3P1LHJn2FX0=--