| Message ID | 20251215155652.23362-1-gert@greenie.muc.de |
|---|---|
| State | New |
| Headers | show |
| Series | [Openvpn-devel,v1] multi: Warn about failing read in multi_process_file_closed() | expand |
Not sure how this can fail, but if it does, we should not silently
ignore it (... as this would likely cause other issues later on, like
not cleaning up ACF files, etc.) -> this makes sense, in it goes.
Your patch has been applied to the master branch.
commit 18d1b1fe008a4bbfd5a56ca7bb59f6f8cb58114a
Author: Frank Lichtenheld
Date: Mon Dec 15 16:56:47 2025 +0100
multi: Warn about failing read in multi_process_file_closed()
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1443
Message-Id: <20251215155652.23362-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35095.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 92eac6f..329d0a3 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -2806,6 +2806,11 @@ char buffer[INOTIFY_EVENT_BUFFER_SIZE]; ssize_t buffer_i = 0; ssize_t r = read(m->top.c2.inotify_fd, buffer, INOTIFY_EVENT_BUFFER_SIZE); + if (r < 0) + { + msg(M_WARN | M_ERRNO, "MULTI: multi_process_file_closed error"); + return; + } while (buffer_i < r) {