projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Always reply to MTU probes via UDP.
[tinc]
/
src
/
net_packet.c
diff --git
a/src/net_packet.c
b/src/net_packet.c
index
7a73ef5
..
626f8b1
100644
(file)
--- a/
src/net_packet.c
+++ b/
src/net_packet.c
@@
-72,7
+72,7
@@
void send_mtu_probe(node_t *n) {
n->mtuevent = NULL;
if(!n->status.reachable || !n->status.validkey) {
n->mtuevent = NULL;
if(!n->status.reachable || !n->status.validkey) {
-
logger(LOG_DEBUG, "Trying to send MTU probe to unreachable
node %s (%s)", n->name, n->hostname);
+
ifdebug(TRAFFIC) logger(LOG_INFO, "Trying to send MTU probe to unreachable or rekeying
node %s (%s)", n->name, n->hostname);
n->mtuprobes = 0;
return;
}
n->mtuprobes = 0;
return;
}
@@
-135,7
+135,7
@@
void mtu_probe_h(node_t *n, vpn_packet_t *packet, length_t len) {
if(!packet->data[0]) {
packet->data[0] = 1;
if(!packet->data[0]) {
packet->data[0] = 1;
- send_packet(n, packet);
+ send_
udp
packet(n, packet);
} else {
if(len > n->maxmtu)
len = n->maxmtu;
} else {
if(len > n->maxmtu)
len = n->maxmtu;
@@
-521,12
+521,16
@@
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;
+ static time_t last_hard_try = 0;
for(node = edge_weight_tree->head; node; node = node->next) {
e = node->data;
for(node = edge_weight_tree->head; node; node = node->next) {
e = node->data;
- if(sockaddrcmp_noport(from, &e->address))
- continue;
+ if(sockaddrcmp_noport(from, &e->address)) {
+ if(last_hard_try == now)
+ continue;
+ last_hard_try = now;
+ }
if(!n)
n = e->to;
if(!n)
n = e->to;