Win32: problem with tinc-up script

Guus Sliepen guus at tinc-vpn.org
Mon Oct 24 21:41:17 CEST 2016


On Mon, Oct 24, 2016 at 09:04:49PM +0200, borg at uu3.net wrote:

> Okey, after more extensive R&D and testing I came up with 2
> final solutions:
> 
> 1) external tool: wipchg
> 2) internal tincd: wait_device(int secs)
> 
> Both solution works 100% time (tested on Win2003).
> I publish them here, so interested parties can do they own testing.
> 
> 1) ftp://borg.uu3.net/home/borg/tmp/wipchg.tgz
>   You need Mingw compiler to build this.
> 2) http://borg.uu3.net/cgit/cgit.cgi/OEM/tinc/log/?h=tap_wait

In both solutions, I do see a race condition: first GetIpAddrTable() is
called, then NotifyAddrChange() is called. If the IP address is assigned
between those two calls, you will not get a notification anymore. I
think you should instead call NotifyAddrChange() first, then do
GetIpAddrTable(), then WaitForSingleObject() if there is no IP address
assigned to tinc's interface yet.

-- 
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-devel/attachments/20161024/6156b0ea/attachment.sig>


More information about the tinc-devel mailing list