X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_key.c;h=3e8d29adfc4df0883dd224b23bab896951671b6c;hb=bb6b97ce3493d49b79f1bd57fdac420c312ef8d6;hp=802f7ca68d5f2707fb6eaed2ce47990d810d3a60;hpb=b99af2f813b897e1fd49c87a7cf44241cad3a017;p=tinc diff --git a/src/protocol_key.c b/src/protocol_key.c index 802f7ca6..3e8d29ad 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -116,6 +116,8 @@ bool send_req_key(node_t *to) { snprintf(label, sizeof label, "tinc UDP key expansion %s %s", myself->name, to->name); sptps_stop(&to->sptps); to->status.validkey = false; + to->status.waitingforkey = true; + to->last_req_key = time(NULL); to->incompression = myself->incompression; return sptps_start(&to->sptps, to, true, true, myself->connection->ecdsa, to->ecdsa, label, sizeof label, send_initial_sptps_data, receive_sptps_record); } @@ -172,6 +174,8 @@ static bool req_key_ext_h(connection_t *c, const char *request, node_t *from, in snprintf(label, sizeof label, "tinc UDP key expansion %s %s", from->name, myself->name); sptps_stop(&from->sptps); from->status.validkey = false; + from->status.waitingforkey = true; + from->last_req_key = time(NULL); sptps_start(&from->sptps, from, false, true, myself->connection->ecdsa, from->ecdsa, label, sizeof label, send_sptps_data, receive_sptps_record); sptps_receive_data(&from->sptps, buf, len); return true;