Attention is currently required from: flichtenheld. Hello flichtenheld,
I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/533?usp=email to review the following change. Change subject: Avoid SIGUR1 to SIGHUP when the configuration is read from stdin ...................................................................... Avoid SIGUR1 to SIGHUP when the configuration is read from stdin If the configuration is read from stdin, we cannot reread the configuration as stdin provides the configuration only once. So whenever we hit the "close_context usr1 to hup" logic, the OpenVPN process will fail as tries to restart with an empty configuration. Change-Id: Icfc179490d6821e22d14817941fb0bad667c713f Signed-off-by: Arne Schwabe <a...@rfc2549.org> --- M src/openvpn/openvpn.c 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/33/533/1 diff --git a/src/openvpn/openvpn.c b/src/openvpn/openvpn.c index 874facf..4d1437d 100644 --- a/src/openvpn/openvpn.c +++ b/src/openvpn/openvpn.c @@ -32,6 +32,7 @@ #include "multi.h" #include "win32.h" #include "platform.h" +#include "string.h" #include "memdbg.h" @@ -60,9 +61,10 @@ /* set point-to-point mode */ c->mode = CM_P2P; - - /* initialize tunnel instance */ - init_instance_handle_signals(c, c->es, CC_HARD_USR1_TO_HUP); + /* initialize tunnel instance, avoid SIGHUP when config is stdin since + * reading the config from stdin will not work */ + bool stdin_config = c->options.config && (strcmp(c->options.config, "stdin") == 0); + init_instance_handle_signals(c, c->es, stdin_config ? 0 : CC_HARD_USR1_TO_HUP); if (IS_SIG(c)) { return; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/533?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Icfc179490d6821e22d14817941fb0bad667c713f Gerrit-Change-Number: 533 Gerrit-PatchSet: 1 Gerrit-Owner: plaisthos <arne-open...@rfc2549.org> Gerrit-Reviewer: flichtenheld <fr...@lichtenheld.com> Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net> Gerrit-Attention: flichtenheld <fr...@lichtenheld.com> Gerrit-MessageType: newchange
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel