]> git.ipfire.org Git - thirdparty/openvpn.git/commit
dco_linux: fix peer stats parsing with new ovpn kernel module
authorAntonio Quartulli <antonio@mandelbit.com>
Sat, 17 May 2025 08:32:23 +0000 (10:32 +0200)
committerGert Doering <gert@greenie.muc.de>
Sat, 17 May 2025 08:42:17 +0000 (10:42 +0200)
commit6c33e3761ecb476d047bc14e7948ffddba800915
tree1a62c410912a46b44b046d78a1952e0693fe34ae
parent69cd7b1703781f52c98cf8a6a2e3a93e71afed16
dco_linux: fix peer stats parsing with new ovpn kernel module

The new ovpn kernel module has changed the netlink attribute
type of the fields containing the pkt/bytes counters in the
peer stats.

We moved from uint64 to uint (a dynamic type can be either
32 or 64 bits), therefore the parsing code must be adapted
accordingly.

While at it, also fix the peer object parsing in the P2P code path.

The fix can be verified by enabling --status with verb 6 and
watching the counters increasing:

2025-05-16 22:23:56 us=649488 dco_get_peer_stats_multi
2025-05-16 22:23:56 us=651008 dco_parse_peer_multi: parsing message...
2025-05-16 22:23:56 us=651734 dco_update_peer_stat / dco_read_bytes: 116280
2025-05-16 22:23:56 us=652682 dco_update_peer_stat / dco_write_bytes: 115776
2025-05-16 22:23:56 us=653467 dco_update_peer_stat / tun_read_bytes: 90048
2025-05-16 22:23:56 us=654110 dco_update_peer_stat / tun_write_bytes: 90048

Change-Id: I104b4adeb9f65cce3487b82f35470174acba92bc
Github: closes OpenVPN/openvpn#746
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20250517083231.27977-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg31666.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/dco_linux.c