]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
dco: remove dco_read/write_bytes from dco_context_t
authorRalf Lici <ralf@mandelbit.com>
Fri, 17 Oct 2025 20:58:31 +0000 (22:58 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 19 Oct 2025 17:10:37 +0000 (19:10 +0200)
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 <ralf@mandelbit.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
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 <gert@greenie.muc.de>
src/openvpn/dco_freebsd.h
src/openvpn/dco_linux.h
src/openvpn/dco_win.h
src/openvpn/multi.c

index 2f486f0229f7fe458308f5a77878093f86940bc9..0797b823fcce2fb76461ae5531536b9b79ad77d9 100644 (file)
@@ -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;
index 310d43355ee63d5791822ca741dd9fcc4e55dc64..efd5b279f6d31f74160ef314c856c1d9d2caacb1 100644 (file)
@@ -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) */
index 4f3f0288ce628f17fe47bb92556db71eb504a39c..02b838910f4980d03f4fc05f3ddc2abc3f4313e7 100644 (file)
@@ -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;
 };
 
index 558314cb068b9cf5bfe9c45a19173448d769e896..e907524f599056068e1c05d20bc0ae4ca95c8c9b 100644 (file)
@@ -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) */