X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Fdevtools.c;h=fb6ab257a0f3eae901ff869c53a774aeb48c413d;hp=5bd061800a0c72f7445cab68cb344d6570470f8c;hb=5d583af29b3ba76f9acaeb77c0e0457268776dcb;hpb=8c8b506da9ce578fe6e6e406a91bbd21af13f7a3 diff --git a/src/devtools.c b/src/devtools.c index 5bd06180..fb6ab257 100644 --- a/src/devtools.c +++ b/src/devtools.c @@ -44,10 +44,16 @@ static void inviter_commits_first_nop_probe(bool stage) { return; } +static void sptps_renewal_nop_probe(meshlink_node_t *node) { + (void)node; + return; +} + void (*devtool_trybind_probe)(void) = nop_probe; void (*devtool_keyrotate_probe)(int stage) = keyrotate_nop_probe; void (*devtool_set_inviter_commits_first)(bool inviter_commited_first) = inviter_commits_first_nop_probe; void (*devtool_adns_resolve_probe)(void) = nop_probe; +void (*devtool_sptps_renewal_probe)(meshlink_node_t *node) = sptps_renewal_nop_probe; /* Return an array of edges in the current network graph. * Data captures the current state and will not be updated. @@ -337,3 +343,19 @@ meshlink_handle_t *devtool_open_in_netns(const char *confbase, const char *name, return handle; } + +void devtool_force_sptps_renewal(meshlink_handle_t *mesh, meshlink_node_t *node) { + if(!mesh || !node) { + meshlink_errno = MESHLINK_EINVAL; + return; + } + + node_t *n = (node_t *)node; + connection_t *c = n->connection; + + n->last_req_key = 0; + + if(c) { + c->last_key_renewal = 0; + } +}