Allow querying DCO status via management status
PATCH 1/1 Allow querying DCO status via management status
This is allows querying the DCO status without doing an error-prone parsing of the startup log.
Also remove comment that serves no purpose anymore.
--- src/openvpn/multi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
src/openvpn/multi.c +2 -1
@@ -837,7 +837,7 @@ multi_print_status(struct multi_context *m, struct status_output *so, const intstatus_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
Signature · 1 line
2.32.1 (Apple Git-133)
Hi,
Code looks good and does what it says - tested on Linux with --status-version 2 and sending SIGUSR2.
Is the first line of the commit message ("Allow querying DCO status via management status") descriptive enough?
Since the change allows users to see DCO status without a management interface, just by sending SIGUSR2, maybe
"multi.c: include DCO status in status version 2" would be better?
[Openvpn-devel] [PATCH applied] Re: Include DCO status in GLOBAL_STATS status v2 output
In reply to Arne SchwabeI have lightly tested it, by sending SIGUSR2 as Lev has suggested. It's not visible in the client GLOBAL_STATS (unsurprisingly, since added to multi_print_status()... but maybe a followup patch?) but on the servers it nicely shows...
Aug 17 21:31:59 ubuntu2004 tap-udp-p2mp[2183229]: GLOBAL_STATS,dco_enabled,0 Aug 17 21:32:01 ubuntu2004 tun-tcp-p2mp[2183195]: GLOBAL_STATS,dco_enabled,1 Aug 17 21:32:05 ubuntu2004 tun-udp-p2mp-fragment[2183260]: GLOBAL_STATS,dco_enabled,0 Aug 17 21:32:09 ubuntu2004 tun-udp-p2mp-topology-subnet[2183217]: GLOBAL_STATS,dco_enabled,1 Aug 17 21:32:11 ubuntu2004 tun-udp-p2mp[2183208]: GLOBAL_STATS,dco_enabled,1
Did not test management interface, but that's the same code anyway.
I have adjusted the commit message + subject as suggested by Lev.
Your patch has been applied to the master branch.
commit b421a0d55afc6e7a566b97cf9b687824be5a9118
Author: Arne Schwabe Date: Sat Aug 13 23:11:04 2022 +0200
Include DCO status in GLOBAL_STATS status v2 output
Signed-off-by: Arne Schwabe <[email protected]...>
Acked-by: Lev Stipakov <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg24923.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering