Do not try to send REQ_KEY or ANS_KEY requests to unreachable nodes.
This commit is contained in:
parent
cb52aa0683
commit
4a1740ede7
1 changed files with 12 additions and 0 deletions
|
@ -134,6 +134,12 @@ bool req_key_h(connection_t *c)
|
||||||
if(tunnelserver)
|
if(tunnelserver)
|
||||||
return false;
|
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)
|
if(tunnelserver)
|
||||||
return false;
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue