diff options
author | Arne Schwabe | 2023-01-10 16:19:01 +0100 |
---|---|---|
committer | Gert Doering | 2023-01-10 16:49:03 +0100 |
commit | d04c2110a006c204b5753113cdbed2866b9641ed (patch) | |
tree | 4f5e9a94cb54933dfe890a0b379945656439e44f | |
parent | 9bc2dfea0e1f643b2a02b61455e1845ae83f7518 (diff) | |
download | openvpn-d04c2110a006c204b5753113cdbed2866b9641ed.zip openvpn-d04c2110a006c204b5753113cdbed2866b9641ed.tar.gz |
Log peer-id if loglevel is D_DCO_DEBUG and dco is enabled
This enables logging the peer id in p2mp mode if dco is enabled
and the log level is high enough
Patch v2: use check_debug_level to check current log level
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230110151901.998479-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25946.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 533c170fb60882547152e3b3222c8f7788d6b80f)
-rw-r--r-- | src/openvpn/multi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 2690485..b639d3c 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -476,6 +476,12 @@ multi_instance_string(const struct multi_instance *mi, bool null, struct gc_aren buf_printf(&out, "%s/", cn); } buf_printf(&out, "%s", mroute_addr_print(&mi->real, gc)); + if (mi->context.c2.tls_multi + && check_debug_level(D_DCO_DEBUG) + && dco_enabled(&mi->context.options)) + { + buf_printf(&out, " peer-id=%d", mi->context.c2.tls_multi->peer_id); + } return BSTR(&out); } else if (null) |