]> 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, 18 Apr 2021 16:01:11 +0000 (18:01 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 20 Apr 2021 08:08:41 +0000 (10:08 +0200)
commit0767d5b447044e4cdcfd198058aef1f85f63bbe6
tree1f5ab969f22cc1c887cff3bc4164fe876f6096e5
parent6fc292d2ed008a53061ce953dea6ff1e692e6723
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>
src/openvpn/forward.c
src/openvpn/multi.c
src/openvpn/openvpn.h
src/openvpn/push.c
src/openvpn/ssl_common.h