projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Increase threshold for detecting two nodes with the same Name.
[tinc]
/
src
/
net_packet.c
diff --git
a/src/net_packet.c
b/src/net_packet.c
index
aef5534
..
e732ef8
100644
(file)
--- a/
src/net_packet.c
+++ b/
src/net_packet.c
@@
-575,20
+575,21
@@
static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) {
avl_node_t *node;
edge_t *e;
node_t *n = NULL;
avl_node_t *node;
edge_t *e;
node_t *n = NULL;
+ bool hard = false;
static time_t last_hard_try = 0;
for(node = edge_weight_tree->head; node; node = node->next) {
e = node->data;
static time_t last_hard_try = 0;
for(node = edge_weight_tree->head; node; node = node->next) {
e = node->data;
+ if(e->to == myself)
+ continue;
+
if(sockaddrcmp_noport(from, &e->address)) {
if(last_hard_try == now)
continue;
if(sockaddrcmp_noport(from, &e->address)) {
if(last_hard_try == now)
continue;
-
last_hard_try = now
;
+
hard = true
;
}
}
- if(!n)
- n = e->to;
-
if(!try_mac(e->to, pkt))
continue;
if(!try_mac(e->to, pkt))
continue;
@@
-596,6
+597,9
@@
static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) {
break;
}
break;
}
+ if(hard)
+ last_hard_try = now;
+
return n;
}
return n;
}