From 85e0df6b493396d9d1d9030c4018f67037d2f12b Mon Sep 17 00:00:00 2001 From: Gert Doering Date: Mon, 9 Jan 2023 21:00:11 +0100 Subject: [PATCH] Reduce logspam about 'dco_update_keys: peer_id=-1' in p2p server mode p2p --tls-server with no active client/peer logs once per second "dco_update_keys: peer_id=-1" which does exactly nothing, except fill the disk. So skip the call to dco_update_keys() if peer_id == -1. Signed-off-by: Gert Doering Acked-by: Antonio Quartulli Message-Id: <20230109200011.2525342-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25935.html Signed-off-by: Gert Doering --- src/openvpn/forward.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index f44f473f6..53f7525c8 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -151,6 +151,12 @@ check_dco_key_status(struct context *c) return; } + /* no active peer (p2p tls-server mode) */ + if (c->c2.tls_multi->dco_peer_id == -1) + { + return; + } + if (!dco_update_keys(&c->c1.tuntap->dco, c->c2.tls_multi)) { /* Something bad happened. Kill the connection to -- 2.47.2