]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Make sending plain text control message session aware
authorArne Schwabe <arne@rfc2549.org>
Wed, 1 Mar 2023 13:53:53 +0000 (14:53 +0100)
committerGert Doering <gert@greenie.muc.de>
Mon, 20 Mar 2023 16:15:38 +0000 (17:15 +0100)
commita261e173341f8e68505a6ab5a413d09b0797a459
tree8c18f528b965f1d9a56a0b916777c9bef3bfe5f1
parent06af538eb7bde36feb20ef63febb171c9607a5e6
Make sending plain text control message session aware

The control messages coming from auth pending should always be on the
session that triggered them (i.e. INITIAL or ACTIVE) and not always on the
active session.  Rework the code path that trigger those messsages from
management and plugin/script to specify the TLS session.

We only support the two TLS sessions that are supposed to be active. TLS
sessions in any lame slot (TM_LAME or KS_LAME) are not considered to be
candidates for sending messages as these slots only serve to keep key
material around.

Unfortunately, this fix requires the management interface to be changed
to allow including the specific session the messages should to go to. As
there are very few users of this interface with auth-pending, I made this
a hard change instead of adding hacky workaround code that is not always
working correctly anyway.

send_control_channel_string() will continue to only use the primary session
and key but the current users of that (push replys and exit notification)
already require the established session to be the active one, so there
no changes needed at the moment.

Github: fixes OpenVPN/openvpn#256

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230301135353.2811069-2-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26320.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Changes.rst
doc/management-notes.txt
src/openvpn/forward.c
src/openvpn/forward.h
src/openvpn/manage.c
src/openvpn/manage.h
src/openvpn/multi.c
src/openvpn/push.c
src/openvpn/push.h
src/openvpn/ssl_verify.c