Skip to content

Commit 531fef4

Browse files
ordexcron2
authored andcommitted
dco: add standard mi prefix handling to multi_process_incoming_dco()
Our code generally expects functions that deal with a multi instance to set up a log prefix at the beginning with set_prefix(mi) and clear it at the end with clear_prefix(). Add the calls to multi_process_incoming_dco() in a similar way to what is done for multi_process_incoming_link() - handling "link events" and "dco events" the same, with correct prefix in the function and no leftover prefix afterwards. Github: closes #799 Change-Id: I1ad5df0f6785ffe9becd9f83329a9335d1a36f24 Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: Gert Doering <[email protected]> Acked-by: Gert Doering <[email protected]> Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg32859.html URL: https://gerrit.openvpn.net/c/openvpn/+/1116 Signed-off-by: Gert Doering <[email protected]>
1 parent 340b5b2 commit 531fef4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/openvpn/multi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3294,6 +3294,7 @@ multi_process_incoming_dco(struct multi_context *m)
32943294
if ((peer_id < m->max_clients) && (m->instances[peer_id]))
32953295
{
32963296
mi = m->instances[peer_id];
3297+
set_prefix(mi);
32973298
if (dco->dco_message_type == OVPN_CMD_DEL_PEER)
32983299
{
32993300
process_incoming_del_peer(m, mi, dco);
@@ -3311,6 +3312,7 @@ multi_process_incoming_dco(struct multi_context *m)
33113312
{
33123313
tls_session_soft_reset(mi->context.c2.tls_multi);
33133314
}
3315+
clear_prefix();
33143316
}
33153317
else
33163318
{

0 commit comments

Comments
 (0)