From: Selva Nair Date: Thu, 28 Jul 2022 03:45:07 +0000 (-0400) Subject: Do not skip ERROR:/SUCCESS: response from management interface X-Git-Tag: v2.5.8~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3c397b0edd86158b8c417f6d396920a7e2eae68;p=thirdparty%2Fopenvpn.git Do not skip ERROR:/SUCCESS: response from management interface Generally we expect a response of SUCCESS: or ERROR: to every command sent to the management interface. But, while in the management-hold state, sending "signal foo" returns only the following reply (with foo = SIGHUP, SIGUSR1 etc.): >HOLD:Waiting for hold release:0 Fix by always responding ERROR: signal 'foo' is currently ignored" followed by the above line. Though this is seldom seen in practice[*], such violation of the protocol could stall clients like the GUI. So fix it. [*] One way this happens is with SIGHUP sent before the daemon is on hold state which it enters before the SIGHUP is received. Signed-off-by: Selva Nair Acked-by: Arne Schwabe Message-Id: <20220728034508.15180-1-selva.nair@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24750.html Signed-off-by: Gert Doering (cherry picked from commit 579b78e22feab7fe7cc627355cbb270cd91aebb4) --- diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index 0b9e92b6b..0ba4f677d 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -428,14 +428,11 @@ man_signal(struct management *man, const char *name) } else { + msg(M_CLIENT, "ERROR: signal '%s' is currently ignored", name); if (man->persist.special_state_msg) { msg(M_CLIENT, "%s", man->persist.special_state_msg); } - else - { - msg(M_CLIENT, "ERROR: signal '%s' is currently ignored", name); - } } } else