projects
/
oweals
/
tinc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't try to send MTU probes to unreachable nodes.
[oweals/tinc.git]
/
src
/
net_packet.c
diff --git
a/src/net_packet.c
b/src/net_packet.c
index 40d945181d72c2a8b728e27e77c1fb8b7cff1fa6..9f61275106fc596a5990d33627f3113f252e9efb 100644
(file)
--- a/
src/net_packet.c
+++ b/
src/net_packet.c
@@
-70,6
+70,11
@@
void send_mtu_probe(node_t *n)
n->mtuprobes++;
n->mtuevent = NULL;
n->mtuprobes++;
n->mtuevent = NULL;
+ if(!n->status.reachable) {
+ ifdebug(TRAFFIC) logger(LOG_INFO, _("Trying to send MTU probe to unreachable node %s (%s)"), n->name, n->hostname);
+ return;
+ }
+
if(n->mtuprobes >= 10 && !n->minmtu) {
ifdebug(TRAFFIC) logger(LOG_INFO, _("No response to MTU probes from %s (%s)"), n->name, n->hostname);
return;
if(n->mtuprobes >= 10 && !n->minmtu) {
ifdebug(TRAFFIC) logger(LOG_INFO, _("No response to MTU probes from %s (%s)"), n->name, n->hostname);
return;
@@
-328,6
+333,11
@@
static void send_udppacket(node_t *n, vpn_packet_t *origpkt)
cp();
cp();
+ if(!n->status.reachable) {
+ ifdebug(TRAFFIC) logger(LOG_INFO, _("Trying to send UDP packet to unreachable node %s (%s)"), n->name, n->hostname);
+ return;
+ }
+
/* Make sure we have a valid key */
if(!n->status.validkey) {
/* Make sure we have a valid key */
if(!n->status.validkey) {