Really avoid trying to send an ANS_KEY request to unreachable nodes.
authorGuus Sliepen <guus@tinc-vpn.org>
Tue, 27 Jul 2021 12:57:18 +0000 (14:57 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 27 Jul 2021 12:57:18 +0000 (14:57 +0200)
Commit ed070d754d1b5500b0ec3615ae342178cfd42efb only printed a warning,
but was missing a return statement.

src/protocol_key.c

index c15c4f6..a9d719b 100644 (file)
@@ -300,6 +300,7 @@ bool req_key_h(connection_t *c, const char *request) {
                if(!from->status.reachable) {
                        logger(DEBUG_ALWAYS, LOG_ERR, "Got %s from %s (%s) origin %s which is not reachable",
                               "REQ_KEY", c->name, c->hostname, from_name);
+                       return true;
                }
 
                /* Is this an extended REQ_KEY message? */