]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Log a note if someone wants to set a MTU below 1280 on IPv6
authorChristopher Schenk <cschenk@mail.uni-paderborn.de>
Mon, 29 Jun 2020 19:09:30 +0000 (21:09 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 30 Jun 2020 07:26:06 +0000 (09:26 +0200)
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200629190930.1360-2-cschenk@mail.uni-paderborn.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg20161.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/tun.c

index 18cdf38d1ab71afcab0d9519ad9628f955021c55..5567c445caff168f0a58ab2fa25adfb8b90fe2a3 100644 (file)
@@ -238,6 +238,10 @@ do_set_mtu_service(const struct tuntap *tt, const short family, const int mtu)
         .family = family
     };
     strncpynt(mtu_msg.iface.name, tt->actual_name, sizeof(mtu_msg.iface.name));
+    if (family == AF_INET6 && mtu < 1280)
+    {
+        msg(M_INFO, "NOTE: IPv6 interface MTU < 1280 conflicts with IETF standards and might not work");
+    }
 
     if (!send_msg_iservice(pipe, &mtu_msg, sizeof(mtu_msg), &ack, "Set_mtu"))
     {
@@ -5498,6 +5502,11 @@ windows_set_mtu(const int iface_index, const short family,
     const char *family_name = (family == AF_INET6) ? "IPv6" : "IPv4";
     ipiface.Family = family;
     ipiface.InterfaceIndex = iface_index;
+    if (family == AF_INET6 && mtu < 1280)
+    {
+        msg(M_INFO, "NOTE: IPv6 interface MTU < 1280 conflicts with IETF standards and might not work");
+    }
+
     err = GetIpInterfaceEntry(&ipiface);
     if (err == NO_ERROR)
     {