From: "flichtenheld (Code Review)" Date: Mon, 27 Oct 2025 13:08:20 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="/zxTqYSDNy8="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: multi: Fix wrong sigma value in multi_push_restart_schedule_exit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --/zxTqYSDNy8= 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/+/1311?usp=3Demail to review the following change. Change subject: multi: Fix wrong sigma value in multi_push_restart_schedule= _exit ...................................................................... multi: Fix wrong sigma value in multi_push_restart_schedule_exit Sigma was computed based on the absolute time and not the delta. Change-Id: I62b8263f18c4e2e7f5ecacb4616737f5ba836303 Signed-off-by: Frank Lichtenheld --- M src/openvpn/multi.c 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/11/1311/1 diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index ad5004e..74cc866 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3843,7 +3843,6 @@ { struct hash_iterator hi; struct hash_element *he; - struct timeval tv; /* tell all clients to restart */ hash_iterator_init(m->iter, &hi); @@ -3861,15 +3860,14 @@ /* reschedule signal */ ASSERT(!openvpn_gettimeofday(&m->deferred_shutdown_signal.wakeup, NULL= )); - tv.tv_sec =3D 2; - tv.tv_usec =3D 0; + struct timeval tv =3D { .tv_sec =3D 2, .tv_usec =3D 0 }; tv_add(&m->deferred_shutdown_signal.wakeup, &tv); m->deferred_shutdown_signal.signal_received =3D m->top.sig->signal_rec= eived; schedule_add_entry(m->schedule, (struct schedule_entry *)&m->deferred_= shutdown_signal, &m->deferred_shutdown_signal.wakeup, - compute_wakeup_sigma(&m->deferred_shutdown_signal.w= akeup)); + compute_wakeup_sigma(&tv)); =20 signal_reset(m->top.sig, 0); } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1311?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: I62b8263f18c4e2e7f5ecacb4616737f5ba836303 Gerrit-Change-Number: 1311 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --/zxTqYSDNy8= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

V= iew Change

multi: Fix wrong sigma value in multi_push_=
restart_schedule_exit

Sigma was computed based on the absolute time = and
not the delta.

Change-Id: I62b8263f18c4e2e7f5ecacb4616737f5ba= 836303
Signed-off-by: Frank Lichtenheld <frank@...2641...>
---<= br>M src/openvpn/multi.c
1 file changed, 2 insertions(+), 4 deletions(-)=

git pull ssh://gerrit.openvpn.net:29418/openvpn=
 refs/changes/11/1311/1
diff --git a/src/openvpn/multi.c b/src/open=
vpn/multi.c
index ad5004e..74cc866 100644
-= -- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c@@ -3843,7 +3843,6 @@
{
struc= t hash_iterator hi;
struct hash_element *he;- struct timeval tv;
/* tell all clients to restart */
= hash_iterator_init(m->iter, &hi);
@@ -386= 1,15 +3860,14 @@

/* reschedule signa= l */
ASSERT(!openvpn_gettimeofday(&m->deferred_= shutdown_signal.wakeup, NULL));
- tv.tv_sec =3D 2;
- tv.tv_usec =3D 0;
+ struct timeval tv =3D { .tv_sec =3D 2, .tv_usec =3D 0 };
tv_add(&m->deferred_shutdown_signal.wakeup, &t= v);

m->deferred_shutdown_signal.s= ignal_received =3D m->top.sig->signal_received;

schedule_add_entry(m->schedule, (struct schedule_entry= *)&m->deferred_shutdown_signal,
= &m->deferred_shutdown_signal.wakeup,
- compute_wakeup_sigma(&= ;m->deferred_shutdown_signal.wakeup));
+ compute_wakeup_sigma(&tv))= ;

signal_reset(m->top.sig, 0);
}

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

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I62b8263f18c4e2e7f5ecacb4616= 737f5ba836303
Gerrit-Change-Number: 1311
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
= --/zxTqYSDNy8=--