Sockets not non-blocking when compiling with MingW

dnk at bjum.net dnk at bjum.net
Thu May 10 21:28:36 CEST 2007


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


More information about the tinc-devel mailing list