X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_key.c;h=cc927ba5882456628f7a55f07ff61d60aa5d7851;hp=a3ef4d60a15c4896e9d6988f8e39a94f40444cb5;hb=4a1740ede7c1992f7f3da5e197db9975c0344ac3;hpb=cb52aa06833a69e57b5e26337e51a4d375b6d8fb diff --git a/src/protocol_key.c b/src/protocol_key.c index a3ef4d60..cc927ba5 100644 --- 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(!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); } @@ -197,6 +203,12 @@ bool ans_key_h(connection_t *c) 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); }