]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Move context_auth from context_2 to tls_multi and name it multi_state
authorArne Schwabe <arne@rfc2549.org>
Sun, 28 Mar 2021 12:02:40 +0000 (14:02 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 20 Apr 2021 09:03:03 +0000 (11:03 +0200)
commit145110101b70599cb9adcf4ed071856daac9c8af
treee60bd7d58a5d959f5410452defbd39c1e2311208
parent48ba0b059138dec7a94d2368375344d39c4e05e9
Move context_auth from context_2 to tls_multi and name it multi_state

context_2 and tls_multi have the same life cycle for TLS connections
but so this move does not affect behaviour of the variable.

OpenVPN TLS multi code has a grown a lot more complex and code that
handles multi objects needs to know the state that the object is in.
Since not all code has access to the context_2 struct, the code that
does not have access is often not checking the state directly but
checks other parts of multi that have been affected from a state
change.

This patch also renames it to multi_state as this variable represents
the multi state machine status rather than just the state of the connect
authentication (more upcoming patches will move other states
into this variable).

Patch V2: also rename context_auth to multi_state, explain a bit why this
          change is done.
Patch V3: Add comments for c2->multi NULL check forwarding. Fix compile
          with ENABLE_ASYNC_PUSH.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20210418160111.1494779-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22155.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(backported from commit 0767d5b447044e4cdcfd198058aef1f85f63bbe6)
src/openvpn/forward.c
src/openvpn/multi.c
src/openvpn/openvpn.h
src/openvpn/push.c
src/openvpn/ssl_common.h