From patchwork Mon Jun 29 09:09:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Schenk X-Patchwork-Id: 1190 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id ANjyJWdB+l4wCwAAIUCqbw for ; Mon, 29 Jun 2020 15:30:47 -0400 Received: from proxy18.mail.ord1d.rsapps.net ([172.30.191.6]) by director8.mail.ord1d.rsapps.net with LMTP id CBrMJWdB+l4WKQAAfY0hYg ; Mon, 29 Jun 2020 15:30:47 -0400 Received: from smtp38.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy18.mail.ord1d.rsapps.net with LMTP id OGOAJWdB+l6ESQAATCaURg ; Mon, 29 Jun 2020 15:30:47 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp38.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=fail (p=none; dis=none) header.from=mail.uni-paderborn.de X-Suspicious-Flag: YES X-Classification-ID: 0796d57e-ba3f-11ea-a4b0-525400f6a58b-1-1 Received: from [216.105.38.7] ([216.105.38.7:45526] helo=lists.sourceforge.net) by smtp38.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 2E/E9-12370-6614AFE5; Mon, 29 Jun 2020 15:30:46 -0400 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jpzTW-0003N9-EK; Mon, 29 Jun 2020 19:29:54 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpzTU-0003Mp-So for openvpn-devel@lists.sourceforge.net; Mon, 29 Jun 2020 19:29:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Agb2RQl1glwjntlOPH8Bpy8YrtEg60dN4EpAV5RediE=; b=TuI2G0blTTCIKJwDX6rfLQu0aD fb2I+HuCNeQqHgAuMV7JZr4cxIv8u+ogDvBZ8EBSpEaXkApFBQTyRcW6Z9DMmZF/e26rzc5Yfu2dA ZV1xbFbS7fe9QqBD8paIy3JrYUnbQcDUP4z9S+YCW0UNGcYXrGoVG9LmYDTGgofpZnCc=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Agb2RQl1glwjntlOPH8Bpy8YrtEg60dN4EpAV5RediE=; b=EGSOuZtBdOZDjSuwI0Bc2MqEUj ys9DRdwSuwjcZFUZuFLUpy53CBJd5BcRFlgCXa49M7gnWUvaYl41dWjinxo1Syta/oCjILdqWRZWM UYP1XF8hYuCmSjZzEFt4DGK4ouJttpBzzFBc+DcH3kgfjxILDEQgu+LaX9fVwNdeg4Kg=; Received: from shirlock.uni-paderborn.de ([131.234.189.15]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jpzTQ-002LHX-1X for openvpn-devel@lists.sourceforge.net; Mon, 29 Jun 2020 19:29:50 +0000 Received: from diego.uni-paderborn.de ([131.234.189.25] helo=localhost.localdomain) by mail.uni-paderborn.de with esmtp (Exim 4.94 shirlock) id 1jpzB4-0007rT-6d for openvpn-devel@lists.sourceforge.net; Mon, 29 Jun 2020 21:10:50 +0200 Received: from mail.uni-paderborn.de by diego with queue id 760247-1 for openvpn-devel@lists.sourceforge.net; Mon, 29 Jun 2020 19:10:48 GMT From: Christopher Schenk To: openvpn-devel@lists.sourceforge.net Date: Mon, 29 Jun 2020 21:09:30 +0200 Message-Id: <20200629190930.1360-2-cschenk@mail.uni-paderborn.de> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200629190930.1360-1-cschenk@mail.uni-paderborn.de> References: <202006101601.05AG1i8K031513@chekov.greenie.muc.de> <20200629190930.1360-1-cschenk@mail.uni-paderborn.de> MIME-Version: 1.0 X-PMX-Version: 6.4.9.2830568, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2020.6.29.190316, AntiVirus-Engine: 5.74.0, AntiVirus-Data: 2020.6.29.5740001 X-IMT-Spam-Score: 0.0 () X-IMT-Authenticated-Sender: X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1jpzTQ-002LHX-1X Subject: [Openvpn-devel] [PATCH 2/2] Log a note if someone wants to set a MTU below 1280 on IPv6 X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox --- src/openvpn/tun.c | 9 +++++++++ 1 file changed, 9 insertions(+) Acked-by: Gert Doering diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 3ef79b2f..67d7664e 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) {