]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Include DCO status in GLOBAL_STATS status v2 output
authorArne Schwabe <arne@rfc2549.org>
Sat, 13 Aug 2022 21:11:04 +0000 (23:11 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 17 Aug 2022 19:19:58 +0000 (21:19 +0200)
This is allows querying the DCO status from management interface or by
sending SIGUSR2 without doing an error-prone parsing of the startup log.

Also remove comment that serves no purpose anymore.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: <20220813211104.411554-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24923.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/multi.c

index 53ee3e1a19e3d2930c18bbf53bd247100f1f077d..95414429f3e212cf0fe4cbf6cd23949cdf6aa87a 100644 (file)
@@ -837,7 +837,7 @@ multi_print_status(struct multi_context *m, struct status_output *so, const int
 
         status_reset(so);
 
-        if (version == 1) /* WAS: m->status_file_version */
+        if (version == 1)
         {
             /*
              * Status file version 1
@@ -984,6 +984,7 @@ multi_print_status(struct multi_context *m, struct status_output *so, const int
                               sep, sep, mbuf_maximum_queued(m->mbuf));
             }
 
+            status_printf(so, "GLOBAL_STATS%cdco_enabled%c%d", sep, sep, dco_enabled(&m->top.options));
             status_printf(so, "END");
         }
         else