Message ID | 20250911201222.25382-1-gert@greenie.muc.de |
---|---|
State | New |
Headers | show |
Series | [Openvpn-devel,v3] dco: add standard mi prefix handling to multi_process_incoming_dco() | expand |
This patch was basically a cooperation between Antonio and me, trying to figure out how things should be, and then fixing the omissions for the DCO event handler. This is what you get when you inherit an old code base full of magic... :-) Tested on a FreeBSD+DCO system, with 3 clients renegotiating frequently, and one of them floating back and forth "right in the middle", and we think we now got both the mi prefix "for floating" and "afterwards" right. An intermediate version had msg_get_prefix() / msg_set_prefix() calls to restore the previous prefix set afterwards, but it turns out that on intering the event handlers, it's "always NULL", because all other multi* functions correctly call prefix_reset() at end. Your patch has been applied to the master and release/2.6 branch (bugfix). commit 531fef40b73f73632548c88697af34cf15a70531 (master) commit 520a58d51fc53909d7e05ddf2a2da62eab439be3 (release/2.6) Author: Antonio Quartulli Date: Thu Sep 11 22:12:16 2025 +0200 dco: add standard mi prefix handling to multi_process_incoming_dco() Signed-off-by: Antonio Quartulli <antonio@mandelbit.com> Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20250911201222.25382-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32859.html URL: https://gerrit.openvpn.net/c/openvpn/+/1116 Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 85975ff..40c7f8f 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3294,6 +3294,7 @@ if ((peer_id < m->max_clients) && (m->instances[peer_id])) { mi = m->instances[peer_id]; + set_prefix(mi); if (dco->dco_message_type == OVPN_CMD_DEL_PEER) { process_incoming_del_peer(m, mi, dco); @@ -3311,6 +3312,7 @@ { tls_session_soft_reset(mi->context.c2.tls_multi); } + clear_prefix(); } else {