The logic in get_recent_address() caused tinc to only consider the first
Address statement that could be resolved to one or more IP addresses.
cache->cfg = lookup_config(cache->config_tree, "Address");
}
- while(cache->cfg && !cache->ai) {
+ while(cache->cfg && !cache->aip) {
char *address, *port;
get_config_string(cache->cfg, &address);
}
}
+ if(cache->ai) {
+ free_known_addresses(cache->ai);
+ }
+
cache->aip = cache->ai = str2addrinfo(address, port, SOCK_STREAM);
if(cache->ai) {