X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_key.c;h=77b829b323633635b4cdd37202211e7d9dbf693e;hb=b18d5b572992debb04a7851e43143711319243a0;hp=c15c4f6e219cf93f326aacdde95d0228b5230e56;hpb=ed070d754d1b5500b0ec3615ae342178cfd42efb;p=tinc diff --git a/src/protocol_key.c b/src/protocol_key.c index c15c4f6e..77b829b3 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -27,16 +27,10 @@ #include "net.h" #include "netutl.h" #include "node.h" -#include "prf.h" #include "protocol.h" #include "route.h" #include "sptps.h" #include "utils.h" -#include "xalloc.h" - -#ifndef DISABLE_LEGACY -static bool mykeyused = false; -#endif void send_key_changed(void) { #ifndef DISABLE_LEGACY @@ -300,6 +294,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? */ @@ -376,7 +371,6 @@ bool send_ans_key(node_t *to) { bin2hex(key, key, keylen); // Reset sequence number and late packet window - mykeyused = true; to->received_seqno = 0; to->received = 0;