]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Read DCO traffic stats from the kernel
authorKristof Provost <kp@FreeBSD.org>
Mon, 5 Dec 2022 16:41:00 +0000 (17:41 +0100)
committerGert Doering <gert@greenie.muc.de>
Tue, 13 Dec 2022 21:38:17 +0000 (22:38 +0100)
commit7695a55be06ccdcfae070b0cb3f0dfddca605003
tree00fcd52d50b52db145d6e9871df7387031ee2ea4
parentf8bfe1a5fb785d2f26f3a38d597604031f081018
Read DCO traffic stats from the kernel

When DCO is active userspace doesn't see all of the traffic, so when we
access these stats we must update them.

Retrieve kernel statistics every time we access the
link_(read|write)_bytes values.

Introduce a dco_(read|write)_bytes so that we don't clobber the existing
statistics, which still count control packets, sent or received directly
through the socket.

Signed-off-by: Kristof Provost <kprovost@netgate.com>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <20221205164103.9190-2-kprovost@netgate.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25618.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit ce2b459dabc29d071be28b8ddaa0512f8c8143ec)
src/openvpn/dco.h
src/openvpn/dco_freebsd.c
src/openvpn/dco_linux.c
src/openvpn/dco_win.c
src/openvpn/multi.c
src/openvpn/openvpn.h
src/openvpn/ovpn_dco_freebsd.h