]> git.ipfire.org Git - thirdparty/openvpn.git/commit
management: resync timer on bytecount interval change
authorRalf Lici <ralf@mandelbit.com>
Tue, 2 Sep 2025 16:00:44 +0000 (18:00 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 2 Sep 2025 16:07:31 +0000 (18:07 +0200)
commit3bc0b2d0aea742640a1acf97fc4b41726b88ce96
treefb7f293ad7679747f9a2ab25a0dfe8a083a87343
parentda309c1e8bed7b9c25e800499400c8ad908276db
management: resync timer on bytecount interval change

coarse_timer_wakeup tracks when the next timer-driven task will occur.
If a user issues `bytecount n` via the management interface, but the
next scheduled wakeup is more than n seconds away, bandwidth logging
will be delayed until that timer fires.

To ensure timely logging, reset the timer whenever a new `bytecount`
command is received. This guarantees that logging begins exactly n
seconds after the command, matching the user-defined interval.

Change-Id: Ic0035d52e0ea123398318870d2f4d21af927a602
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20250902160050.18640-1-gert@greenie.muc.de>
URL: https://sourceforge.net/p/openvpn/mailman/message/59228306/
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/manage.c