]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Implement --mtu-disc for IPv6 UDP sockets.
authorGert Doering <gert@greenie.muc.de>
Tue, 22 Feb 2022 14:35:14 +0000 (15:35 +0100)
committerGert Doering <gert@greenie.muc.de>
Thu, 12 May 2022 06:03:21 +0000 (08:03 +0200)
commit043c67f36342969cd171d24c70ee6b62ebc95fee
tree12a2a14194259a1302f54182f41383872bb93740
parentbaa1e67f310b1db3c5b7b9b9f12867a86c947648
Implement --mtu-disc for IPv6 UDP sockets.

Commit 4225114b96 repaired "--mtu-disc yes" brokenness for IPv4 UDP sockets
(caused by autoconf/ifdef issues).  This patch adds new functionality
to do --mtu-disc for IPv6 sockets as well.

Half of it (setsockopt(IPV6_MTU_DISCOVER)) was already there, but
receiving of detailed socket errors was missing the enablement of
setsockopt(IPV6_RECVERR) and parsing of IPPROTO_IPV6/IPV6_RECVERR
messages received.

With that, we now get (sending over a route with "mtu 1300"):

2022-02-22 15:28:07 write UDPv6 [EMSGSIZE Path-MTU=1300]: Message too long
(fd=3,code=90)
2022-02-22 15:28:07 Note adjusting 'mssfix 1400 mtu' to 'mssfix 1300 mtu'
according to path MTU discovery
2022-02-22 15:28:07 Note adjusting 'fragment 1400 mtu' to 'fragment 1300
mtu' according to path MTU discovery

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20220222143514.3480-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23879.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/mtu.c