From: Ralf Lici Date: Fri, 17 Oct 2025 20:58:31 +0000 (+0200) Subject: dco: remove dco_read/write_bytes from dco_context_t X-Git-Tag: v2.7_rc1~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e76d8f8a475d08bcb50321e742a06c53e19d45d;p=thirdparty%2Fopenvpn.git dco: remove dco_read/write_bytes from dco_context_t Remove dco_read_bytes and dco_write_bytes from all dco_context_t structures, as peer statistics are now stored directly in the corresponding c2 fields across all DCO interfaces. Change-Id: I61f9d9bb26112eac0c0a47cb9d17982b075887ff Signed-off-by: Ralf Lici Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1276 Message-Id: <20251017205837.8553-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg33431.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/dco_freebsd.h b/src/openvpn/dco_freebsd.h index 2f486f022..0797b823f 100644 --- a/src/openvpn/dco_freebsd.h +++ b/src/openvpn/dco_freebsd.h @@ -59,8 +59,6 @@ typedef struct dco_context int dco_message_peer_id; int dco_del_peer_reason; struct sockaddr_storage dco_float_peer_ss; - uint64_t dco_read_bytes; - uint64_t dco_write_bytes; struct context *c; } dco_context_t; diff --git a/src/openvpn/dco_linux.h b/src/openvpn/dco_linux.h index 310d43355..efd5b279f 100644 --- a/src/openvpn/dco_linux.h +++ b/src/openvpn/dco_linux.h @@ -81,8 +81,6 @@ typedef struct int dco_message_key_id; int dco_del_peer_reason; struct sockaddr_storage dco_float_peer_ss; - uint64_t dco_read_bytes; - uint64_t dco_write_bytes; } dco_context_t; #endif /* defined(ENABLE_DCO) && defined(TARGET_LINUX) */ diff --git a/src/openvpn/dco_win.h b/src/openvpn/dco_win.h index 4f3f0288c..02b838910 100644 --- a/src/openvpn/dco_win.h +++ b/src/openvpn/dco_win.h @@ -55,9 +55,6 @@ struct dco_context int dco_del_peer_reason; struct sockaddr_storage dco_float_peer_ss; - uint64_t dco_read_bytes; - uint64_t dco_write_bytes; - struct context *c; }; diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 558314cb0..e907524f5 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3266,8 +3266,6 @@ process_incoming_del_peer(struct multi_context *m, struct multi_instance *mi, dc * installed, and we do not need to clean up the state in the kernel */ mi->context.c2.tls_multi->dco_peer_id = -1; mi->context.sig->signal_text = reason; - mi->context.c2.dco_read_bytes = dco->dco_read_bytes; - mi->context.c2.dco_write_bytes = dco->dco_write_bytes; multi_signal_instance(m, mi, SIGTERM); } @@ -3337,8 +3335,6 @@ multi_process_incoming_dco(struct multi_context *m) dco->dco_message_type = 0; dco->dco_message_peer_id = -1; dco->dco_del_peer_reason = -1; - dco->dco_read_bytes = 0; - dco->dco_write_bytes = 0; return ret > 0; } #endif /* if defined(ENABLE_DCO) */