Remove broadcast-based local discovery mechanism.

The new local address based local discovery mechanism is technically
superior to the old broadcast-based one. In fact, the old algorithm
can technically make things worse by e.g. sending broadcasts over the
VPN itself and then selecting the VPN address as the node's UDP
address. This cannot happen with the new mechanism.

Note that this means old nodes that don't send their local addresses in
ADD_EDGE messages can't be discovered, because there is no address to
send discovery packets to. Old nodes can still discover new nodes by
sending them broadcasts, though.
This commit is contained in:
Etienne Dechamps 2014-06-29 11:01:24 +01:00
parent e16ade874d
commit 4159108971
4 changed files with 5 additions and 58 deletions

View file

@ -341,10 +341,7 @@ This will allow direct communication using LAN addresses, even if both peers are
and they only ConnectTo a third node outside the NAT,
which normally would prevent the peers from learning each other's LAN address.
.Pp
Currently, local discovery is implemented by sending some packets to the local address of the node during path MTU discovery. With older nodes that don't transmit their local address, it sends local broadcast packets instead.
.It Va LocalDiscoveryAddress Li = Ar address
If this variable is specified, broadcast packets used in local discovery are sent to the given
.Ar address .
Currently, local discovery is implemented by sending some packets to the local address of the node during path MTU discovery. This will not work with old nodes that don't transmit their local address.
.It Va MACExpire Li = Ar seconds Pq 600
This option controls the amount of time MAC addresses are kept before they are removed.
This only has effect when