Add UPnP support to tincd.
authorEtienne Dechamps <etienne@edechamps.fr>
Sun, 15 Nov 2015 13:40:07 +0000 (13:40 +0000)
committerEtienne Dechamps <etienne@edechamps.fr>
Sat, 21 Nov 2015 16:17:59 +0000 (16:17 +0000)
This commit makes tincd capable of discovering UPnP-IGD devices on the
local network, and add mappings (port redirects) for its TCP and/or UDP
port.

The goal is to improve reliability and performance of tinc with nodes
sitting behind home routers that support UPnP, by making it less reliant
on UDP Hole Punching, which is prone to failure when "hostile" NATs are
involved.

The way this is implemented is by leveraging the libminiupnpc library,
which we have just added a new dependency on. We use pthread to run the
UPnP client code in a dedicated thread; we can't use the tinc event loop
because libminiupnpc doesn't have a non-blocking API.


No differences found