When creating an edge after authenticating a peer, we copy the
address used for the TCP connection, but change the port to that used
for UDP. But the way we did it discarded the scope_id for IPv6
addresses. This prevented UDP communication from working correctly when
connecting to a peer on the same LAN using an IPv6 link-local address.
Thanks to Rafał Leśniak for pointing out this issue.
This means: setup_outgoing_connection() has to prepare fake
Address = "ip port" config based on the actuall configuration file
Prefer the addresses discovered via SLDP while making outgoing connections
This function takes an "Address" config string, splits it into
address and port, then calls str2addinfo() on it returning addrinfo.
The aim is to refactor the code an allow simple translation
of addresses listed in configuration or generated on demand
in other places in the code.
On larger networks with almost the same ping interval
nodes will ping each other at the same time, of course
it doesn't makes much traffic but the main reason why
we have PING/PONG is to check if other side is still
online. So, when we got PING from the other node then
it is alive.
Make tincd recognize when it was asleep and close connections to it's
peers. This happens when e.g. RoadWarrior has been suspended for
"longer" time period. After resume, it will start to communicate
with it's peers using the contextes it had before suspend.
On the other side, the nodes closed the connections since PingTimeout
and/or TCP connection went down.
Sending data to such unaware (sptps mostly) nodes will cause
havoc in the logs. Misleading the developers to wrong assumptions
that something is wrong with sptps.
# Conflicts:
# src/net.c
Make tincd recognize when it was asleep and close connections to it's
peers. This happens when e.g. RoadWarrior has been suspended for
"longer" time period. After resume, it will start to communicate
with it's peers using the contextes it had before suspend.
On the other side, the nodes closed the connections since PingTimeout
and/or TCP connection went down.
Sending data to such unaware (sptps mostly) nodes will cause
havoc in the logs. Misleading the developers to wrong assumptions
that something is wrong with sptps.
Before this fix seconds were treated as milliseconds.
Example:
A ping of 1.001s resulted in current_rtt = 2 (ms)
where a ping of 0.999s resulted in current_rtt = 999 (ms).