From: Antonio Quartulli Date: Tue, 3 Jan 2023 21:23:28 +0100 Message-Id: <20230103202330.1835-1-a@...2181...> MIME-Version: 1.0 Subject: [Openvpn-devel] [PATCH 1/3] dco: properly re-initialize dco_del_peer_reason List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel@lists.sourceforge.net Cc: Antonio Quartulli After processing a message, all fields of the dco object should be re-initialized so that future processings are not affected by stale values. This includes dco_del_peer_reason. Since its values can start at 0, re-initialize it with -1. Signed-off-by: Antonio Quartulli --- src/openvpn/multi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 3658e1d5..27676de5 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3301,6 +3301,7 @@ multi_process_incoming_dco(struct multi_context *m) dco->dco_message_type = 0; dco->dco_message_peer_id = -1; + dco->dco_del_peer_reason = -1; dco->dco_read_bytes = 0; dco->dco_write_bytes = 0; return ret > 0; -- 2.38.2