From: Etienne Dechamps Date: Mon, 29 Dec 2014 16:11:04 +0000 (+0000) Subject: Remove PMTU discovery code redundant with UDP discovery. X-Git-Tag: release-1.1pre12~242 X-Git-Url: http://tinc-vpn.org/git/browse?a=commitdiff_plain;h=eef792c01ed1704c03d55163de3f302a3c1d42fa;hp=eef792c01ed1704c03d55163de3f302a3c1d42fa;p=tinc Remove PMTU discovery code redundant with UDP discovery. This is a rewrite of the send_mtu_probe_handler() function to make it focus on the actual discovery of PMTU. In particular, the PMTU discovery code doesn't care about tunnel state anymore - it only cares about doing the initial PMTU discovery, and once that's done, making sure PMTU did not increase by checking it from time to time. All other duties have already been rewritten in the UDP discovery code. As a result, the send_mtu_probe_handler(), which previously implemented a nightmarish state machine which was very difficult to follow and understand, has been massively simplified. We moved from four persistent states to only two - initial discovery and steady state. Furthermore, a side effect is that network chatter is reduced: instead of sending bursts of three minmtu-sized packets in the steady state, there is only one such packet that's sent from the UDP discovery code. However, that introduces a slight regression in the bandwidth estimation code, which relies on three-packet bursts in order to function. Considering that this estimation is extremely unreliable (in my experience) and isn't relied on by anything, this seems like an acceptable regression. ---