Merge branch 'master' into 1.1
Conflicts: doc/tincd.8.in lib/pidfile.c src/graph.c src/net.c src/net.h src/net_packet.c src/net_setup.c src/net_socket.c src/netutl.c src/node.c src/node.h src/protocol_auth.c src/protocol_key.c src/tincd.c
This commit is contained in:
commit
5a132550de
23 changed files with 534 additions and 183 deletions
27
src/graph.c
27
src/graph.c
|
|
@ -312,27 +312,8 @@ void sssp_bfs(void) {
|
|||
e->to->via = indirect ? n->via : e->to;
|
||||
e->to->options = e->options;
|
||||
|
||||
if(sockaddrcmp(&e->to->address, &e->address)) {
|
||||
node = splay_unlink(node_udp_tree, e->to);
|
||||
sockaddrfree(&e->to->address);
|
||||
sockaddrcpy(&e->to->address, &e->address);
|
||||
|
||||
if(e->to->hostname)
|
||||
free(e->to->hostname);
|
||||
|
||||
e->to->hostname = sockaddr2hostname(&e->to->address);
|
||||
|
||||
if(node)
|
||||
splay_insert_node(node_udp_tree, node);
|
||||
|
||||
if(e->to->options & OPTION_PMTU_DISCOVERY) {
|
||||
e->to->mtuprobes = 0;
|
||||
e->to->minmtu = 0;
|
||||
e->to->maxmtu = MTU;
|
||||
if(e->to->status.validkey)
|
||||
send_mtu_probe(e->to);
|
||||
}
|
||||
}
|
||||
if(e->to->address.sa.sa_family == AF_UNSPEC && e->address.sa.sa_family != AF_UNKNOWN)
|
||||
update_node_udp(e->to, &e->address);
|
||||
|
||||
list_insert_tail(todo_list, e->to);
|
||||
}
|
||||
|
|
@ -364,13 +345,13 @@ void check_reachability() {
|
|||
if(n->status.reachable) {
|
||||
ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Node %s (%s) became reachable"),
|
||||
n->name, n->hostname);
|
||||
splay_insert(node_udp_tree, n);
|
||||
} else {
|
||||
ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Node %s (%s) became unreachable"),
|
||||
n->name, n->hostname);
|
||||
splay_delete(node_udp_tree, n);
|
||||
}
|
||||
|
||||
/* TODO: only clear status.validkey if node is unreachable? */
|
||||
|
||||
n->status.validkey = false;
|
||||
n->status.waitingforkey = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue