]> git.ipfire.org Git - thirdparty/openvpn.git/commit
In x_check_status() read errno early
authorSelva Nair <selva.nair@gmail.com>
Fri, 22 Jul 2022 20:40:07 +0000 (16:40 -0400)
committerGert Doering <gert@greenie.muc.de>
Sat, 23 Jul 2022 12:05:40 +0000 (14:05 +0200)
commit95afd63ac74197980ecff2b3ecb2116d62035f7f
treee85bf70c87a8bfcf6cc86675905022dd69a0d644
parent79932b94513303567fdd5d1c4e0abb79e6642b6e
In x_check_status() read errno early

The correct errno can get overwritten by the call to
format_extended_socket_error() which may set errno to EAGAIN
losing the original error and cause to bypass the error reporting
below. Fix by reading the errno of interest at the top of the
function.

Reported by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20220722204007.7537-1-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24728.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/error.c