]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Abort client-connect handler loop after first handler sets 'disable'.
authorGert Doering <gert@greenie.muc.de>
Mon, 27 Jul 2020 18:34:36 +0000 (20:34 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 28 Jul 2020 07:46:04 +0000 (09:46 +0200)
commit20b394746a7a351d892bb8c21beb66dd138631d9
treee96e56b8aca68004a569faaced97e180845b3950
parent08f3c1cab7367fc8447001db34fd9627d60ba2b2
Abort client-connect handler loop after first handler sets 'disable'.

The old code would run all (succeeding) handlers, then discover "one of
them set the 'disable' flag for this client", and then unroll all the
handlers.

Moving the 'disable' check into the loop makes it stop after the first
handler that fails or (succeeds and sets 'disable').  This is a bit
more logical in the log files, and has less potential side effects
due to running "later" client-connect handlers when we already know
they will have to be unrolled.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20200727183436.6625-2-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg20612.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/multi.c