Fix potential crash during failing PMTU discovery.
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 16 Jan 2022 19:45:41 +0000 (20:45 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 16 Jan 2022 20:39:14 +0000 (21:39 +0100)
commit0912276c6467aa3ee6f570b31245367319da572a
tree62f36f8e5bc9e7fa93eeb40d1a690989cbaab4cc
parente32d4f3db3f1ed3eebe2e11d57512b60a6c02fa6
Fix potential crash during failing PMTU discovery.

If we get PACKET_TOO_BIG responses when sending UDP packets, we lower the
maximum MTU we will probe accordingly. However, after enough of those
responses, maxmtu could drop below zero and wrap. Guard against that by
never dropping maxmtu below the minimum required MTU for UDP communication.
src/net.h
src/net_packet.c