}
// Also make sure that if outstanding key requests for the UDP counterpart of a connection has timed out, we restart it.
- if(c->node) {
- if(c->node->status.waitingforkey && c->node->last_req_key + pingtimeout < mesh->loop.now.tv_sec) {
- send_req_key(mesh, c->node);
- }
- }
-
if(c->status.active && c->last_key_renewal + 3600 < mesh->loop.now.tv_sec) {
devtool_sptps_renewal_probe((meshlink_node_t *)c->node);
logger(mesh, MESHLINK_DEBUG, "Could not update %s", n->name);
}
}
-
- if(n->status.reachable && n->status.validkey && n->last_req_key + 3600 < mesh->loop.now.tv_sec) {
- logger(mesh, MESHLINK_DEBUG, "SPTPS key renewal for node %s", n->name);
- devtool_sptps_renewal_probe((meshlink_node_t *)n);
-
- if(!sptps_force_kex(&n->sptps)) {
- logger(mesh, MESHLINK_ERROR, "SPTPS key renewal for node %s failed", n->name);
- n->status.validkey = false;
- sptps_stop(&n->sptps);
- n->status.waitingforkey = false;
- n->last_req_key = -3600;
- } else {
- n->last_req_key = mesh->loop.now.tv_sec;
- }
- }
}
timeout_set(&mesh->loop, data, &(struct timespec) {