]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Refactor management bytecount tracking
authorLev Stipakov <lev@openvpn.net>
Tue, 2 Sep 2025 10:36:01 +0000 (12:36 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 2 Sep 2025 15:27:33 +0000 (17:27 +0200)
commitda309c1e8bed7b9c25e800499400c8ad908276db
treecb889c6050c7760dc2c99a533b1817be7f4e448e
parent6d450085c6a66d0c9e59eafddb83759166fb48c7
Refactor management bytecount tracking

There are few issues with it:

 - when using DCO, the server part doesn't output BYTECOUNT_CLI since
   process_incoming_link_part1/process_outgoing_link are not called

 - when using DCO, the server part applies bytecount timer to the each
   connection, unneccessary making too many calls to the kernel and also
   uses incorrect BYTECOUNT output.

 - client part outputs counters using timer, server part utilizes
   traffic activity -> inconsistency

Following changes have been made:

 - Use timer to output counters in client and server mode. Code which
   deals with bytecount on traffic activity has been removed. This unifies
   DCO and non-DCO, as well as client and server mode

 - In server mode, peers stats are fetched with the single ioctl call

 - Per-packet stats are not persisted anymore in the client mode during
   traffic activity. Instead cumulative stats (including DCO stats) are
   persisted when the session closes.

GitHub: closes OpenVPN/openvpn#820

Change-Id: I43a93f0d84f01fd808a64115e1b8c3b806706491
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20250902103606.22181-1-gert@greenie.muc.de>
URL: https://sourceforge.net/p/openvpn/mailman/message/59228150/
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/forward.c
src/openvpn/manage.c
src/openvpn/manage.h
src/openvpn/multi.c