From: Christopher Schenk Date: Mon, 29 Jun 2020 19:09:30 +0000 (+0200) Subject: Log a note if someone wants to set a MTU below 1280 on IPv6 X-Git-Tag: v2.5_beta1~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93439307e597007e0d60b904c0f3d9d85de26b49;p=thirdparty%2Fopenvpn.git Log a note if someone wants to set a MTU below 1280 on IPv6 Acked-by: Gert Doering 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 --- diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 18cdf38d1..5567c445c 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -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) {