From e5b9bd324cc24355956e9e59e5ec2df72cf9d469 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 23 Jun 2018 22:26:12 +0200 Subject: [PATCH] Avoid treating compressed MTU probes as having a negative length. This was not harmful, but caused negative values being logged. --- src/net_packet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/net_packet.c b/src/net_packet.c index ebf2938..9baaf4c 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -462,7 +462,10 @@ static bool receive_udppacket(node_t *n, vpn_packet_t *inpkt) { inpkt = outpkt; - origlen -= MTU / 64 + 20; + if (origlen > MTU / 64 + 20) + origlen -= MTU / 64 + 20; + else + origlen = 0; } if(inpkt->len > n->maxrecentlen) { -- 2.25.1