Message ID | 20221218195810.1216368-1-selva.nair@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [Openvpn-devel] Reduce default restart pause to 1 second | expand |
Am 18.12.22 um 20:58 schrieb selva.nair@gmail.com: > +--connect-retry n [max] > Wait ``n`` seconds between connection attempts (default :code:`5`). you were close. but forgot to change the 5 in the next line to also say 1. Arne
Hi, On Mon, Dec 19, 2022 at 01:12:32PM +0100, Arne Schwabe wrote: > Am 18.12.22 um 20:58 schrieb selva.nair@gmail.com: > > +--connect-retry n [max] > > Wait ``n`` seconds between connection attempts (default :code:`5`). > > you were close. but forgot to change the 5 in the next line to also say 1. I can do that on the fly ("not a code change") if you agree to the change otherwise - since Selva quoted you here... :-) gert
On Sun, Dec 18, 2022 at 02:58:10PM -0500, selva.nair@gmail.com wrote: > From: Selva Nair <selva.nair@gmail.com> > > Current value of restart pause is 5 seconds which feels > unduly long. Reduce it to 1 second. > > User can still customize the delay using the first parameter for > "--connect-retry". > > Also improve the description of "--connect-retry" in the > man page. Some comments about that part: > diff --git a/doc/man-sections/client-options.rst b/doc/man-sections/client-options.rst > index 07651479..37d24044 100644 > --- a/doc/man-sections/client-options.rst > +++ b/doc/man-sections/client-options.rst > @@ -138,7 +138,7 @@ configuration. > Set ``--verb 6`` for debugging info showing the transformation of > src/dest addresses in packets. > > ---connect-retry n > +--connect-retry n [max] This breaks the formatting, because rst option lists are stupid and only expect zero or one arguments. Needs to use the "args" -> "valid syntaxes" pattern seen elsewhere in the documentation. > Wait ``n`` seconds between connection attempts (default :code:`5`). You didn't actually adapt the default here. > Repeated reconnection attempts are slowed down after 5 retries per > remote by doubling the wait time after each unsuccessful attempt. An Regards,
diff --git a/doc/man-sections/client-options.rst b/doc/man-sections/client-options.rst index 07651479..37d24044 100644 --- a/doc/man-sections/client-options.rst +++ b/doc/man-sections/client-options.rst @@ -138,7 +138,7 @@ configuration. Set ``--verb 6`` for debugging info showing the transformation of src/dest addresses in packets. ---connect-retry n +--connect-retry n [max] Wait ``n`` seconds between connection attempts (default :code:`5`). Repeated reconnection attempts are slowed down after 5 retries per remote by doubling the wait time after each unsuccessful attempt. An diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 4383c953..4442697f 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -815,7 +815,7 @@ init_options(struct options *o, const bool init_gc) o->ce.proto = PROTO_UDP; o->ce.af = AF_UNSPEC; o->ce.bind_ipv6_only = false; - o->ce.connect_retry_seconds = 5; + o->ce.connect_retry_seconds = 1; o->ce.connect_retry_seconds_max = 300; o->ce.connect_timeout = 120; o->connect_retry_max = 0;