Make autoconnect try to heal network splits.
authorGuus Sliepen <guus@tinc-vpn.org>
Tue, 22 Aug 2017 18:51:44 +0000 (20:51 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 22 Aug 2017 18:51:44 +0000 (20:51 +0200)
commit92fdabc439bdb5e16f64a4bf2ed1deda54f7c544
tree1ab3ed8be4f59d1a39bb673f45e3bbf5c4a636f5
parent7c223917cb3d478fc3f5b23ee5602925f083e4d4
Make autoconnect try to heal network splits.

When we have less than three connections, we greedily try to connect to any
viable node. However, once we have three connections, try to connect to
nodes that we know of but that aren't reachable.

We also make sure that if there are 100 reachable nodes, and 1 unreachable
one, that not all 100 reachable nodes try to connect to the unreachable
at the same time.
src/Makefile.am
src/autoconnect.c [new file with mode: 0644]
src/autoconnect.h [new file with mode: 0644]
src/net.c