From 72e1737dca0e24e5bf41664efed850f580c59409 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 26 Sep 2021 20:20:06 +0200 Subject: [PATCH] Account for SPTPS overhead. --- src/pmtu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pmtu.c b/src/pmtu.c index 5f771cfc..7d238e25 100644 --- a/src/pmtu.c +++ b/src/pmtu.c @@ -123,7 +123,7 @@ static void send_udp_probe_reply(meshlink_handle_t *mesh, node_t *n, vpn_packet_ bool udp_confirmed = n->status.udp_confirmed; n->status.udp_confirmed = true; logger(mesh, MESHLINK_DEBUG, "Sending UDP reply length %d to %s", packet->len, n->name); - n->out_meta += packet->len; + n->out_meta += packet->len + SPTPS_DATAGRAM_OVERHEAD; send_udppacket(mesh, n, packet); n->status.udp_confirmed = udp_confirmed; } @@ -134,7 +134,7 @@ void udp_probe_h(meshlink_handle_t *mesh, node_t *n, vpn_packet_t *packet, uint1 return; } - n->in_meta += packet->len; + n->in_meta += packet->len + SPTPS_DATAGRAM_OVERHEAD; if(!packet->data[0]) { /* It's a probe request, send back a reply */ @@ -215,7 +215,7 @@ static void send_udp_probe_packet(meshlink_handle_t *mesh, node_t *n, int len) { logger(mesh, MESHLINK_DEBUG, "Sending UDP probe length %d to %s", len, n->name); - n->out_meta += packet.len; + n->out_meta += packet.len + SPTPS_DATAGRAM_OVERHEAD; send_udppacket(mesh, n, &packet); } -- 2.39.2