]> git.ipfire.org Git - thirdparty/openvpn.git/commit
dco: Update counters when a client disconnects
authorKristof Provost <kp@FreeBSD.org>
Mon, 5 Dec 2022 16:41:01 +0000 (17:41 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 14 Dec 2022 12:00:18 +0000 (13:00 +0100)
commit6674963debfb88c0dd3dd4eae4533010ffc319b1
treea7b39c547bb31b4f041318954fe0feeea456fc49
parent4cf7409e82580f2890c391372d60ed713ba4650c
dco: Update counters when a client disconnects

When the kernel module (Linux or FreeBSD) notifies us that a peer has
disconnected we'd like to get a final count of the in/out bytes for that
peer.
We can't request that information any more, because the kernel has
already removed the peer at that point.

Have the kernel send that information as part of the "delete peer"
notification, and update the counters a final time.

This implements the FreeBSD-specific DCO code, but not the
Linux-specific code. It will simply add 0 to the count on Linux.

Signed-off-by: Kristof Provost <kprovost@netgate.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20221205164103.9190-3-kprovost@netgate.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25614.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/dco_freebsd.c
src/openvpn/dco_freebsd.h
src/openvpn/dco_linux.h
src/openvpn/multi.c