X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_key.c;h=57377b2fb22e55ec14b2486a1873007d6e0c0641;hp=115845a0e206777e13df93aba2455feb4a5e3636;hb=4c30004cb6dc23616d7295b0ce631f066e7f1f82;hpb=af77e5d475d4d4ab7ad036e926a05f4f3b5c6589 diff --git a/src/protocol_key.c b/src/protocol_key.c index 115845a0..57377b2f 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -111,7 +111,7 @@ bool send_req_key(node_t *to) { sptps_stop(&to->sptps); to->status.validkey = false; to->status.waitingforkey = true; - to->last_req_key = time(NULL); + to->last_req_key = now.tv_sec; 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); } @@ -169,7 +169,7 @@ static bool req_key_ext_h(connection_t *c, const char *request, node_t *from, in sptps_stop(&from->sptps); from->status.validkey = false; from->status.waitingforkey = true; - from->last_req_key = time(NULL); + from->last_req_key = now.tv_sec; 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;