Timeout during authentication - connection timeout not configurable?
Guus Sliepen
guus at tinc-vpn.org
Wed Mar 29 21:29:55 CEST 2017
On Wed, Mar 29, 2017 at 08:59:33PM +0200, Nick Hibma wrote:
> >> Is there an option somewhere to set the connection timeout? I've already set the ping timeout to 15s and I would like to set the connect timeout to 15s as well.
> >
> > The connection timeout is always the same as PingTimeout in tinc.
>
> I remember it being faster than that, but in that case I must be mistaken. I had a look around at how to set that timeout and noticed people use a select() construct to do it, not a simple socket setting. So I guess your comment make sense then.
>
> Well, I'll check again and get back to you if I can figure out what actually goes wrong.
In tinc connection timeouts are handled with exactly the same code as
the ping timeouts. Each connection has a variable tracking the last time
a ping was sent. When a connection is created, it is set to the current
time. In the event loop, it regularly checks whether the current time is
greater than last_ping_time + pingtimeout. If so, it terminates the
connection. The timer is only reset when the connection is "activated",
ie. after the authentication phase finished. If your ping times are 5
seconds then beware that it takes multiple round trips to set up the TCP
connection and perform the authentication.
--
Met vriendelijke groet / with kind regards,
Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20170329/561a3f8e/attachment.sig>
More information about the tinc
mailing list