[Openvpn-devel,applied] Re: t_server_null: forcibly kill misbehaving servers

Message ID 202410251121.49PBLsu6064612@chekov.greenie.muc.de
State Accepted
Headers show
Series [Openvpn-devel,applied] Re: t_server_null: forcibly kill misbehaving servers | expand

Commit Message

Gert Doering Oct. 25, 2024, 11:21 a.m. UTC
Tested this quite extensively up to v9 ;-) - by intentionally making
openvpn server misbehave (ignoring first 2 signals sent to it) with
this patch

see from the buildbot fail mails what happened and if this is "infra 
problem" or "incoming patch problem".

BB + GHA agree that this is fine, for the non-broken-server case ;-)

Your patch has been applied to the master branch.

commit 37db7fe37afb555de651314a04c537fd7fbaa280
Author: Samuli Seppänen
Date:   Fri Oct 25 12:36:31 2024 +0200

     t_server_null: forcibly kill misbehaving servers

     Signed-off-by: Samuli Seppänen <samuli.seppanen@gmail.com>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20241025103632.4413-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29655.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -3864,6 +3864,10 @@  multi_push_restart_schedule_exit(struct multi_context *m, bool next_server)
 bool
 multi_process_signal(struct multi_context *m)
 {
+static int n=0;
+    if (n++ < 1 )
+       { msg(M_INFO, "MPS: ignore signal"); signal_reset(m->top.sig,0); return false; }
+

.. and v9 now properly reports this as "test fail" plus shows the
(previously root-owned and unreadable) log file, so we can more easily