X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fprotocol_key.c;h=16e97eb2c6053652668412982bafd2bfc7b98b25;hb=HEAD;hp=768b6371e4a03338cc98f93b06595d4fe3726da9;hpb=8cbd423d5425bd13232de9c69a84a9b4b1ff3b88;p=meshlink 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) {