]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ovpn: fix VPN TX bytes counting
authorRalf Lici <ralf@mandelbit.com>
Fri, 30 Jan 2026 17:32:50 +0000 (18:32 +0100)
committerAntonio Quartulli <antonio@openvpn.net>
Thu, 12 Feb 2026 14:28:59 +0000 (15:28 +0100)
commitb660b13d4c6379ca6360f24aaef8c5807fefd237
treeceecb8d95b3a4530c319265a04c00ecb9a5cd458
parenta5ec7baa44ea3a1d6aa0ca31c0ad82edf9affe41
ovpn: fix VPN TX bytes counting

In ovpn_net_xmit, after GSO segmentation and segment processing, the
first segment on the list is used to increment VPN TX statistics, which
fails to account for any subsequent segments in the chain.

Fix this by accumulating the length of every segment that successfully
passes skb_share_check into a tx_bytes variable. This ensures the peer
statistics accurately reflect the total data volume sent, regardless of
whether the original packet was segmented.

Fixes: 04ca14955f9a ("ovpn: store tunnel and transport statistics")
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
drivers/net/ovpn/io.c