]> git.ipfire.org Git - thirdparty/openvpn.git/commit
dco: fix crash when --multihome is used with --proto tcp
authorAntonio Quartulli <a@unstable.cc>
Tue, 15 Aug 2023 23:15:55 +0000 (01:15 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 10 Sep 2023 15:10:06 +0000 (17:10 +0200)
commit0793eb105c5720c4eb31af71c9db81459439e510
treeb6cef0180d548947a61299ab7d69dbdbeecfb593
parent34bf473e19118eecf525e7401ef37b1cbf661e67
dco: fix crash when --multihome is used with --proto tcp

Although it's a combination of options that is not really useful,
when specifying --multihome along with --proto tcp and DCO is enabled,
OpenVPN will crash while attempting to access c2.link_socket_actual
(NULL for the TCP case) in order to retrieve the local address (in
function dco_multi_get_localaddr())

Prevent crash by running this code only if proto is UDP.
The same check is already performed in socket.c/h for the non-DCO
case.

Github: fixes OpenVPN/openvpn#390
Change-Id: I61adc26ce2ff737e020c3d980902a46758cb23e5
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230815231555.6465-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26953.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/dco.c