Hello. When tinc is compiled with MingW, sockets are not made non-blocking because O_NONBLOCK is not defined anywhere. This leads to weird timeouts when one or more hosts part of a VPN are unreachable, because tinc hangs in connect() (and possibly other places as well). This guy is probably experiencing this bug: http://brouwer.uvt.nl/pipermail/tinc/2007-April/001646.html I've attached a patch that adds some win32-specific code to make sockets non-blocking. I've been using it for a couple of hours, and have experienced no problems so far. -------------- next part -------------- A non-text attachment was scrubbed... Name: tinc-1.0.7-win32-nonblock.diff Type: text/x-patch Size: 1242 bytes Desc: not available Url : http://brouwer.uvt.nl/pipermail/tinc-devel/attachments/20070510/581a0e57/tinc-1.0.7-win32-nonblock.bin
And here's a revised patch that doesn't break compiling on other platforms. (whoops.) -------------- next part -------------- A non-text attachment was scrubbed... Name: tinc-1.0.7-win32-nonblock.diff Type: text/x-patch Size: 1242 bytes Desc: not available Url : http://brouwer.uvt.nl/pipermail/tinc-devel/attachments/20070511/68fa1f64/tinc-1.0.7-win32-nonblock.bin
On Thu, May 10, 2007 at 09:28:36PM +0200, dnk@bjum.net wrote:> When tinc is compiled with MingW, sockets are not made non-blocking > because O_NONBLOCK is not defined anywhere. > > This leads to weird timeouts when one or more hosts part of a VPN are > unreachable, because tinc hangs in connect() (and possibly other > places as well). > > This guy is probably experiencing this bug: > http://brouwer.uvt.nl/pipermail/tinc/2007-April/001646.html > > I've attached a patch that adds some win32-specific code to make > sockets non-blocking. I've been using it for a couple of hours, and > have experienced no problems so far.Thank you for providing a fix for this issue! I committed the patch to the Subversion repository. I'll try to release a new version of tinc with this fix next weekend. -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus@tinc-vpn.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://brouwer.uvt.nl/pipermail/tinc-devel/attachments/20070514/210dde18/attachment.pgp
On Mon, 14 May 2007 11:44:43 +0200 Guus Sliepen <guus@tinc-vpn.org> wrote:> I committed the patch to the Subversion repository. I'll try to > release a new version of tinc with this fix next weekend.Thank you.