X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Fprotocol_key.c;fp=src%2Fprotocol_key.c;h=745845a650ebd0453660e53301a0cbc056459931;hp=768b6371e4a03338cc98f93b06595d4fe3726da9;hb=f85d80c1974bd96543bdd6dd584f841c99d3ca1b;hpb=29564e004b526b20da2f3244a304d257bd81fe89 diff --git a/src/protocol_key.c b/src/protocol_key.c index 768b6371..745845a6 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -346,8 +346,8 @@ bool req_key_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { } size_t len = strlen(request); - from->in_forward += len; - to->out_forward += len; + from->in_forward += len + SPTPS_OVERHEAD; + to->out_forward += len + SPTPS_OVERHEAD; send_request(mesh, to->nexthop->connection, NULL, "%s", request); } @@ -417,8 +417,8 @@ bool ans_key_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { /* TODO: find a good way to avoid the use of strlen() */ size_t len = strlen(request); - from->in_forward += len; - to->out_forward += len; + from->in_forward += len + SPTPS_OVERHEAD; + to->out_forward += len + SPTPS_OVERHEAD; /* Append the known UDP address of the from node, if we have a confirmed one */ if(!*address && from->status.udp_confirmed && from->address.sa.sa_family != AF_UNSPEC) {