Hi,

On Tue, Dec 27, 2022 at 11:12:44AM +0100, Gert Doering wrote:
> Playing around with the patch a bit, the offending piece seems to be
> "mi->context.options.verbosity >= D_DCO_DEBUG" - which is unsurprising,
> as D_DCO_DEBUG is not "6" but "LOGLEV(6, 69, M_DEBUG)", which translates
> to 
> 
>   #define LOGLEV(log_level, mute_level, other) ((log_level) | 
> ENCODE_MUTE_LEVEL(mute_level) | other)
> 
> (numerically, D_DCO_DEBUG = 1157628038)

... looking at error.h, there is a "check_debug_level(flags)" thing, so
changing the condition to

+        if (mi->context.c2.tls_multi
+            // && mi->context.options.verbosity >= D_DCO_DEBUG
+            && check_debug_level(D_DCO_DEBUG)
+            && dco_enabled(&mi->context.options))
+        {
+            buf_printf(&out, " peer-id=%d", mi->context.c2.tls_multi->peer_id);
+        }

works - "if --verb 6 or higher, *and* DCO, then have peer-id=%d as part
if the prefix".

Can you resend a v3?

gert
-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             g...@greenie.muc.de

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to