aboutsummaryrefslogtreecommitdiff
path: root/src/openvpn/manage.c
diff options
context:
space:
mode:
authorSelva Nair2022-07-27 23:45:07 -0400
committerGert Doering2022-08-02 13:48:53 +0200
commit579b78e22feab7fe7cc627355cbb270cd91aebb4 (patch)
treec98b2e89d03294b8e025d7f9c08e619af5199444 /src/openvpn/manage.c
parentb8b0a95efff0184cebacc43a6e751fa8f9092cd8 (diff)
downloadopenvpn-579b78e22feab7fe7cc627355cbb270cd91aebb4.zip
openvpn-579b78e22feab7fe7cc627355cbb270cd91aebb4.tar.gz
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 <selva.nair@gmail.com> Acked-by: Arne Schwabe <arne@rfc2549.org> 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 <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/manage.c')
-rw-r--r--src/openvpn/manage.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
index 5d58c66..27aa49a 100644
--- a/src/openvpn/manage.c
+++ b/src/openvpn/manage.c
@@ -426,14 +426,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