ACK, thanks a lot.

I could reproduce the effect as well -- set "--explicit-exit-notify 5",
try to connect to a non-responsive server (unused IP address, ...), and 
~2 seconds before the 60 second timeout, press ctrl-c.  Flooding of
SIGUSR1 messages, no way to stop it (except "kill -9"), quite an annoyance.

With your patch, this changes to

  Tue Nov 29 08:55:19 2016 UDPv4 link remote: [AF_INET]199.102.77.82:51189
  ^C
  Tue Nov 29 08:56:17 2016 event_wait : Interrupted system call (code=4)
  Tue Nov 29 08:56:17 2016 SIGTERM received, sending exit notification to peer
  Tue Nov 29 08:56:19 2016 TLS Error: TLS key negotiation failed to occur 
within 60 seconds (check your network connectivity)
  Tue Nov 29 08:56:19 2016 TLS Error: TLS handshake failed
  Tue Nov 29 08:56:19 2016 Converting soft SIGUSR1 received during exit 
notification to SIGTERM
  Tue Nov 29 08:56:19 2016 SIGTERM[soft,exit-with-notification] received, 
process exiting

.. which fixes the issue for good.

"Real signals" are still ignored (kill -USR1 from another window):

Tue Nov 29 08:58:19 2016 event_wait : Interrupted system call (code=4)
Tue Nov 29 08:58:19 2016 Ignoring SIGUSR1 received during exit notification

(or pressing ctrl-c a second time while it's waiting for the exit notification
to proceed)


(Also, the explanation and the code change make sense :-) )


I've added a blank to the comment line ("true.If" -> "true. If").

Your patch has been applied to the master branch.

commit f25a0217e35f53c3110ebb226e1d1f3528152cb5
Author: Selva Nair
Date:   Mon Nov 28 21:27:04 2016 -0500

     Map restart signals from event loop to SIGTERM during exit-notification 
wait

     Signed-off-by: Selva Nair <selva.n...@gmail.com>
     Acked-by: Gert Doering <g...@greenie.muc.de>
     Message-Id: <1480386424-30876-1-git-send-email-selva.n...@gmail.com>
     URL: 
https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13284.html
     Signed-off-by: Gert Doering <g...@greenie.muc.de>


--
kind regards,

Gert Doering


------------------------------------------------------------------------------
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to