projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cb52aa0
)
Do not try to send REQ_KEY or ANS_KEY requests to unreachable nodes.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 25 Oct 2008 19:54:00 +0000
(19:54 +0000)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 25 Oct 2008 19:54:00 +0000
(19:54 +0000)
src/protocol_key.c
patch
|
blob
|
history
diff --git
a/src/protocol_key.c
b/src/protocol_key.c
index
a3ef4d6
..
cc927ba
100644
(file)
--- a/
src/protocol_key.c
+++ b/
src/protocol_key.c
@@
-134,6
+134,12
@@
bool req_key_h(connection_t *c)
if(tunnelserver)
return false;
if(tunnelserver)
return false;
+ if(!to->status.reachable) {
+ logger(LOG_WARNING, _("Got %s from %s (%s) destination %s which is not reachable"),
+ "REQ_KEY", c->name, c->hostname, to_name);
+ return true;
+ }
+
send_req_key(to->nexthop->connection, from, to);
}
send_req_key(to->nexthop->connection, from, to);
}
@@
-197,6
+203,12
@@
bool ans_key_h(connection_t *c)
if(tunnelserver)
return false;
if(tunnelserver)
return false;
+ if(!to->status.reachable) {
+ logger(LOG_WARNING, _("Got %s from %s (%s) destination %s which is not reachable"),
+ "ANS_KEY", c->name, c->hostname, to_name);
+ return true;
+ }
+
return send_request(to->nexthop->connection, "%s", c->buffer);
}
return send_request(to->nexthop->connection, "%s", c->buffer);
}