From: "cron2 (Code Review)" Date: Mon, 15 Dec 2025 15:36:01 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <23e294be96a2580d97c4c870bb651a7de4daef32-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="ylyRJg2TSfo="; 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: flichtenheld , plaisthos Cc: openvpn-devel --ylyRJg2TSfo= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#10) to the change originally created b= y flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1311?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 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. Note that this probably makes no actual difference in practice. The sigma value is irrelevant on first call and multi_push_restart_schedule_exit should not be called multiple times since it is only called if deferred_shutdown_signal.signal_received is not set, yet. Change-Id: I62b8263f18c4e2e7f5ecacb4616737f5ba836303 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1311 Message-Id: <20251215150500.18898-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35= 075.html Signed-off-by: Gert Doering --- M src/openvpn/multi.c 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/11/1311/10 diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index d2d9ba8e..d9cb3a9 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3820,7 +3820,6 @@ { struct hash_iterator hi; struct hash_element *he; - struct timeval tv; /* tell all clients to restart */ hash_iterator_init(m->iter, &hi); @@ -3838,15 +3837,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)); 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: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I62b8263f18c4e2e7f5ecacb4616737f5ba836303 Gerrit-Change-Number: 1311 Gerrit-PatchSet: 10 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --ylyRJg2TSfo= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #10 to the change originally created by flichtenhe= ld.

View Change

The following approvals got outdated and were remov= ed: Code-Review+2 by cron2

multi: Fix wrong sigma value in mul=
ti_push_restart_schedule_exit

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

Note that this probably makes no actua= l difference in
practice. The sigma value is irrelevant on first calland multi_push_restart_schedule_exit should not be
called multiple time= s since it is only called
if deferred_shutdown_signal.signal_received is= not set,
yet.

Change-Id: I62b8263f18c4e2e7f5ecacb4616737f5ba8363= 03
Signed-off-by: Frank Lichtenheld <frank@...2641...>
Acked-by= : Gert Doering <gert@...1296...>
Gerrit URL: https://gerrit.openvp= n.net/c/openvpn/+/1311
Message-Id: <20251215150500.18898-1-gert@...1711...= 96...>
URL: https://www.mail-archive.com/openvpn-devel@...1357...= rge.net/msg35075.html
Signed-off-by: Gert Doering <gert@...1296...>= ;
---
M src/openvpn/multi.c
1 file changed, 2 insertions(+), 4 del= etions(-)

git pull ssh://gerrit.openvpn.net:2941=
8/openvpn refs/changes/11/1311/10
diff --git a/src/openvpn/multi.c =
b/src/openvpn/multi.c
index d2d9ba8e..d9cb3a9 100644=
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi= .c
@@ -3820,7 +3820,6 @@
{
struct hash_iterator hi;
struct hash_element *he= ;
- struct timeval t= v;

/* tell all clients to restart */=
hash_iterator_init(m->iter, &hi);
@@ -3838,15 +3837,14 @@

/* resch= edule signal */
ASSERT(!openvpn_gettimeofday(&m-&g= t;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.wa= keup, &tv);

m->deferred_shutd= own_signal.signal_received =3D m->top.sig->signal_received;
schedule_add_entry(m->schedule, (struct sc= hedule_entry *)&m->deferred_shutdown_signal,
= &m->deferred_shutdown_signal.wakeup,
- compute_wakeu= p_sigma(&m->deferred_shutdown_signal.wakeup));
+ compute_wakeup_sig= ma(&tv));

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

To view, v= isit cha= nge 1311. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I62b8263f18c4e2e7f5ecacb4616= 737f5ba836303
Gerrit-Change-Number: 1311
Gerrit-PatchSet: 10
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --ylyRJg2TSfo=--