openvpn/src
Gert Doering 172fe07129
Some checks failed
Build / Check code style with Uncrustify (push) Has been cancelled
Build / gcc-mingw - x64 - OSSL (push) Has been cancelled
Build / gcc-mingw - x86 - OSSL (push) Has been cancelled
Build / gcc - ubuntu-24.04 - OpenSSL 3.0.13 --enable-pkcs11 (push) Has been cancelled
Build / gcc - ubuntu-22.04 - OpenSSL 3.0.2 --enable-pkcs11 (push) Has been cancelled
Build / gcc - ubuntu-22.04 - mbed TLS 2.28.0 (push) Has been cancelled
Build / clang-asan - ubuntu-22.04 - mbedtls (push) Has been cancelled
Build / clang-asan - ubuntu-22.04 - openssl (push) Has been cancelled
Build / clang-asan - ubuntu-24.04 - mbedtls (push) Has been cancelled
Build / clang-asan - ubuntu-24.04 - openssl (push) Has been cancelled
Build / macos-13 - libressl - asan (push) Has been cancelled
Build / macos-13 - openssl@1.1 - asan (push) Has been cancelled
Build / macos-13 - openssl@3 - asan (push) Has been cancelled
Build / macos-14 - libressl - asan (push) Has been cancelled
Build / macos-14 - openssl@1.1 - asan (push) Has been cancelled
Build / macos-14 - openssl@3 - asan (push) Has been cancelled
Build / macos-15 - libressl - asan (push) Has been cancelled
Build / macos-15 - openssl@1.1 - asan (push) Has been cancelled
Build / macos-15 - openssl@3 - asan (push) Has been cancelled
Build / macos-13 - libressl - normal (push) Has been cancelled
Build / macos-13 - openssl@1.1 - normal (push) Has been cancelled
Build / macos-13 - openssl@3 - normal (push) Has been cancelled
Build / macos-14 - libressl - normal (push) Has been cancelled
Build / macos-14 - openssl@1.1 - normal (push) Has been cancelled
Build / macos-14 - openssl@3 - normal (push) Has been cancelled
Build / macos-15 - libressl - normal (push) Has been cancelled
Build / macos-15 - openssl@1.1 - normal (push) Has been cancelled
Build / macos-15 - openssl@3 - normal (push) Has been cancelled
Build / msbuild - amd64 - openssl (push) Has been cancelled
Build / msbuild - arm64 - openssl (push) Has been cancelled
Build / msbuild - x86 - openssl (push) Has been cancelled
Build / clang asan - ubuntu-22.04 - libressl (push) Has been cancelled
Build / gcc normal - ubuntu-22.04 - libressl (push) Has been cancelled
Build / mingw unittest argv - x64 - OSSL (push) Has been cancelled
Build / mingw unittest auth_token - x64 - OSSL (push) Has been cancelled
Build / mingw unittest buffer - x64 - OSSL (push) Has been cancelled
Build / mingw unittest crypto - x64 - OSSL (push) Has been cancelled
Build / mingw unittest cryptoapi - x64 - OSSL (push) Has been cancelled
Build / mingw unittest misc - x64 - OSSL (push) Has been cancelled
Build / mingw unittest ncp - x64 - OSSL (push) Has been cancelled
Build / mingw unittest packet_id - x64 - OSSL (push) Has been cancelled
Build / mingw unittest pkt - x64 - OSSL (push) Has been cancelled
Build / mingw unittest provider - x64 - OSSL (push) Has been cancelled
Build / mingw unittest tls_crypt - x64 - OSSL (push) Has been cancelled
Build / mingw unittest argv - x86 - OSSL (push) Has been cancelled
Build / mingw unittest auth_token - x86 - OSSL (push) Has been cancelled
Build / mingw unittest buffer - x86 - OSSL (push) Has been cancelled
Build / mingw unittest crypto - x86 - OSSL (push) Has been cancelled
Build / mingw unittest cryptoapi - x86 - OSSL (push) Has been cancelled
Build / mingw unittest misc - x86 - OSSL (push) Has been cancelled
Build / mingw unittest ncp - x86 - OSSL (push) Has been cancelled
Build / mingw unittest packet_id - x86 - OSSL (push) Has been cancelled
Build / mingw unittest pkt - x86 - OSSL (push) Has been cancelled
Build / mingw unittest provider - x86 - OSSL (push) Has been cancelled
Build / mingw unittest tls_crypt - x86 - OSSL (push) Has been cancelled
tunnel_server_*(): close correct inotify fd
On a full SIGUSR1 restart of a p2mp server compiled with
--enable-async-push, tunnel_server_{udp,tcp}() will try to close and
reopen the "inotify" control file descriptor.  For whatever reason,
the original code referenced the wrong context, always closing fd 0.

As a consequence of this, on the second SIGUSR1 restart, the server
will close() the first active socket file descriptor, and if there
are active DCO clients, the resulting event confusion will lead to
an ASSERT(!mi->halt).

Fix by closing the correct FD. Add logging.

This is a backport of commit 5521872f80 to the "old p2mp code"
with a separate mudp.c and mtcp.c for UDP and TCP servers, respectively.

Github: fixes OpenVPN/openvpn#966

Change-Id: Idcb1421b9f7fcbee9620fd1d45cceab050751373
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1499
Message-Id: <20260128150640.13867-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35493.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2026-01-29 18:28:32 +01:00
..
compat Update Copyright statements to 2024 2024-03-18 18:49:36 +01:00
openvpn tunnel_server_*(): close correct inotify fd 2026-01-29 18:28:32 +01:00
openvpnmsica Update Copyright statements to 2024 2024-03-18 18:49:36 +01:00
openvpnserv interactive.c: harden pipe handling against misbehaving clients 2025-11-27 12:04:19 +01:00
plugins Update Copyright statements to 2024 2024-03-18 18:49:36 +01:00
tapctl Update Copyright statements to 2024 2024-03-18 18:49:36 +01:00
Makefile.am Update Copyright statements to 2024 2024-03-18 18:49:36 +01:00