Page 1 of 1

Insufficient Documentation regarding ping-exit option

Posted: Mon Sep 12, 2022 10:12 am
by Akito
--ping-exit n
Causes OpenVPN to exit after n seconds pass without reception of a ping or other packet from remote. This option can be combined with --inactive, --ping, and --ping-exit to create a two-tiered inactivity disconnect.For example,

openvpn [options...] --inactive 3600 --ping 10 --ping-exit 60

when used on both peers will cause OpenVPN to exit within 60 seconds if its peer disconnects, but will exit after one hour if no actual tunnel data is exchanged.
https://openvpn.net/community-resources ... envpn-2-4/

What exit code will be emitted by `ping-exit`?

Can it be modified?

Re: Insufficient Documentation regarding ping-exit option

Posted: Mon Sep 12, 2022 11:11 am
by TinCanTech
Akito wrote:
Mon Sep 12, 2022 10:12 am
What exit code will be emitted by `ping-exit`?
exit zero
Akito wrote:
Mon Sep 12, 2022 10:12 am
Can it be modified?
By editing the source code.

Re: Insufficient Documentation regarding ping-exit option

Posted: Wed Sep 14, 2022 9:34 pm
by Akito
TinCanTech wrote:
Mon Sep 12, 2022 11:11 am
By editing the source code.
Well, that's bad. Should be an option and 0 is the wrong exit code for an exit on failure.

Re: Insufficient Documentation regarding ping-exit option

Posted: Wed Sep 14, 2022 10:09 pm
by TinCanTech
Technically, it is not an ERROR EXIT and therefore not a failure. --ping-exit functioned correctly.

There may be something that you can do to remap SIG* but you would have to read the manual for that.