projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace node_udp_tree with a hash table.
[tinc]
/
src
/
graph.c
diff --git
a/src/graph.c
b/src/graph.c
index
b3a2c25
..
9da552e
100644
(file)
--- a/
src/graph.c
+++ b/
src/graph.c
@@
-226,6
+226,9
@@
static void check_reachability(void) {
n->name, n->hostname);
}
n->name, n->hostname);
}
+ if(experimental && OPTION_VERSION(n->options) >= 2)
+ n->status.sptps = true;
+
/* TODO: only clear status.validkey if node is unreachable? */
n->status.validkey = false;
/* TODO: only clear status.validkey if node is unreachable? */
n->status.validkey = false;
@@
-263,10
+266,16
@@
static void check_reachability(void) {
subnet_update(n, NULL, n->status.reachable);
subnet_update(n, NULL, n->status.reachable);
- if(!n->status.reachable)
+ if(!n->status.reachable)
{
update_node_udp(n, NULL);
update_node_udp(n, NULL);
- else if(n->connection)
- send_ans_key(n);
+ } else if(n->connection) {
+ if(n->status.sptps) {
+ if(n->connection->outgoing)
+ send_req_key(n);
+ } else {
+ send_ans_key(n);
+ }
+ }
}
}
}
}
}
}