From: Guus Sliepen Date: Sat, 23 Jun 2018 20:26:12 +0000 (+0200) Subject: Avoid treating compressed MTU probes as having a negative length. X-Git-Tag: release-1.1pre17~13 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=e5b9bd324cc24355956e9e59e5ec2df72cf9d469;p=tinc Avoid treating compressed MTU probes as having a negative length. This was not harmful, but caused negative values being logged. --- diff --git a/src/net_packet.c b/src/net_packet.c index ebf2938a..9baaf4c8 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) {