From: Etienne Dechamps Date: Wed, 31 Dec 2014 16:12:11 +0000 (+0000) Subject: Add IP_MTU-based maxmtu estimation. X-Git-Tag: release-1.1pre12~232 X-Git-Url: http://tinc-vpn.org/git/browse?a=commitdiff_plain;ds=inline;h=bce17c83e871cb8a8c9158045eaf13f1be4b3d13;hp=bce17c83e871cb8a8c9158045eaf13f1be4b3d13;p=tinc Add IP_MTU-based maxmtu estimation. Linux provides a getsockopt() option, IP_MTU, to get the kernel's best guess at a connection MTU. In practice, it seems to return the MTU of the physical interface the socket is using. This patch uses this option to initialize maxmtu to a better value when MTU discovery starts. Unfortunately, this is not supported on Windows. Winsock has options such as SO_MAX_MSG_SIZE, SO_MAXDG and SO_MAXPATHDG but they seem useless as they always return absurdly large values (typically, 65507), as confirmed by http://support.microsoft.com/kb/822061/ ---