dco: send SIGUSR1 upon ping timeout
PATCH 1/1 dco: send SIGUSR1 upon ping timeout
When a peer is removed with reason "ping expire", we should kill the instance with SIGUSR1 and not SIGTERM
--
Arne, I am not 100% sure why but it seems for ping-restart we always use SIGUSR1, right? but the DCO handling code was apparently using SIGTERM.
What do you think?
--- src/openvpn/multi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
src/openvpn/multi.c +3 -1
@@ -3234,10 +3234,12 @@ process_incoming_del_peer(struct multi_context *m, struct multi_instance *mi, dco_context_t *dco) {const char *reason ="ovpn-dco: unknown reason" ; +int signal =SIGTERM ;switch (dco->dco_del_peer_reason) {case OVPN_DEL_PEER_REASON_EXPIRED : reason ="ovpn-dco: ping expired" ; + signal =SIGUSR1 ;break ;case OVPN_DEL_PEER_REASON_TRANSPORT_ERROR :
@@ -3270,7 +3272,7 @@ process_incoming_del_peer(struct multi_context *m, struct multi_instance *mi, mi->context.sig->signal_text = reason; mi->context.c2.dco_read_bytes = dco->dco_read_bytes; mi->context.c2.dco_write_bytes = dco->dco_write_bytes; -multi_signal_instance (m, mi,SIGTERM ); +multi_signal_instance (m, mi, signal); }bool
Signature · 1 line
2.38.2
Am 12.01.23 um 01:04 schrieb Antonio Quartulli:
Quoted 11 lines
When a peer is removed with reason "ping expire", we should kill the instance with SIGUSR1 and not SIGTERM
Cc Arne Schwabe <[email protected]...>Signed-off-by Antonio Quartulli <[email protected]...>--
Arne, I am not 100% sure why but it seems for ping-restart we always use SIGUSR1, right? but the DCO handling code was apparently using SIGTERM.
What do you think?
This makes no difference in p2mp mode.
Arne
Hi,
Quoted 7 lines · Arne Schwabe
Am 12.01.23 um 01:04 schrieb Antonio Quartulli:
Quoted 4 lines
Arne, I am not 100% sure why but it seems for ping-restart we always use SIGUSR1, right? but the DCO handling code was apparently using SIGTERM.
What do you think?
This makes no difference in p2mp mode.
This is how I remember the code, from the "incoming explicit-exit-notify vs. p2p/p2mp server" testing. Logging is different for SIGUSR1 vs. SIGTERM instances ("restarting / terminating client instance" or something like that) but *then* the same thing happens.
You can't "restart" an incoming session ;-)
-> putting this to "Rejected" in patchwork.
gert
Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany [email protected]...