]> tinc-vpn.org Git - tinc/blobdiff - src/net_packet.c
Prevent oracle attacks in the legacy protocol (CVE-2018-16737, CVE-2018-16738)
[tinc] / src / net_packet.c
index 5d704815939b09590f551309505d985d461cf6a5..a516b4a9fb893e38831c7beb40e153c97326d5ab 100644 (file)
@@ -461,10 +461,11 @@ static bool receive_udppacket(node_t *n, vpn_packet_t *inpkt) {
 
                inpkt = outpkt;
 
-               if (origlen > MTU / 64 + 20)
+               if(origlen > MTU / 64 + 20) {
                        origlen -= MTU / 64 + 20;
-               else
+               } else {
                        origlen = 0;
+               }
        }
 
        if(inpkt->len > n->maxrecentlen) {