]> 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 19:03:09 +0000 (20:03 +0100)
commitce2b459dabc29d071be28b8ddaa0512f8c8143ec
tree9d9375e751c85a37c9baa94c273baaead4bb2966
parent7d0a90335fe79a352456f262ce42ea501796ae87
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>
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