Without this commit, if remote host cannot be reached, we get stuck in loop 
trying to
connect and we cannot reload a new configuration using SIGHUP.
In this case, the only way to reload the configuration is to kill and relaunch 
the daemon.

With this commit, following use case can be done:
- Set a good config file
- Launch vpn client daemon -> Connect OK
- Change config file (configure a wrong remote host)
- client daemon reload conf -> Connect failed and loop retrying connection
- Change config file (configure a good remote host)
- client daemon reload conf -> Connect OK

Signed-off-by: Herve Codina <herve.cod...@celad.com>
 src/openvpn/sig.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/openvpn/sig.c b/src/openvpn/sig.c
index b3ae645..073a285 100644
--- a/src/openvpn/sig.c
+++ b/src/openvpn/sig.c
@@ -226,7 +226,7 @@ pre_init_signal_catch (void)
   signal_mode = SM_PRE_INIT;
   signal (SIGINT, signal_handler);
   signal (SIGTERM, signal_handler);
-  signal (SIGHUP, SIG_IGN);
+  signal (SIGHUP, signal_handler);
   signal (SIGUSR1, SIG_IGN);
   signal (SIGUSR2, SIG_IGN);
   signal (SIGPIPE, SIG_IGN);

Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
Openvpn-devel mailing list

Reply via email to