From patchwork Tue Dec 7 06:01:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 2124 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.31.255.6]) by backend41.mail.ord1d.rsapps.net with LMTP id InANOcuTr2EHUwAAqwncew (envelope-from ) for ; Tue, 07 Dec 2021 12:03:07 -0500 Received: from proxy11.mail.iad3b.rsapps.net ([172.31.255.6]) by director11.mail.ord1d.rsapps.net with LMTP id qC8TGsyTr2GydgAAvGGmqA (envelope-from ) for ; Tue, 07 Dec 2021 12:03:08 -0500 Received: from smtp33.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy11.mail.iad3b.rsapps.net with LMTPS id AKEFE8yTr2HPbwAARNREpw (envelope-from ) for ; Tue, 07 Dec 2021 12:03:08 -0500 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: smtp33.gate.iad3b.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=none (p=nil; dis=none) header.from=rfc2549.org X-Suspicious-Flag: YES X-Classification-ID: 8b99738e-577f-11ec-ab03-525400fb5834-1-1 Received: from [216.105.38.7] ([216.105.38.7:46948] helo=lists.sourceforge.net) by smtp33.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id D5/24-09544-AC39FA16; Tue, 07 Dec 2021 12:03:06 -0500 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1mudrF-0003Pb-FB; Tue, 07 Dec 2021 17:02:26 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mudr9-0003OI-N1 for openvpn-devel@lists.sourceforge.net; Tue, 07 Dec 2021 17:02:20 +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:To:From:Sender:Reply-To:Cc: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=rk1ZzxsYPDFlcR1mPcZF4/mp5njnNauJs600apm/HqQ=; b=aeeOJut4CExTtXMBjdbBH5mh4l Ecj3yAJLUlJaCxKqXKiVWzbP6LnQyZskE9QbWct1vYoj3va+Lf0TXE3Ln3/mkM4xrj0HrzAgsiy0A 954qQ9aGR64QIYftAnUB+BooEzVRB872hd555HNNG/SbZU7T85n8mGMkId6JcKay2/zU=; 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:To:From:Sender:Reply-To:Cc: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=rk1ZzxsYPDFlcR1mPcZF4/mp5njnNauJs600apm/HqQ=; b=F5BQEDUANX0nMeoomPVv7DyDzP JdYHH1b5Y4MwTeR7fIYMJettMCbwPcb3D7q6YT5T9i2RF80F6it3B2+HFd1hRuYWaBdL+Trv3wEuO GNeHdC3S4cxdIb/WS/FTXKFWM2X5T7Wfes8jyw9GzfFnax/IbSOfu5c604fBcmcQiXvw=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1mudr8-007aKB-N6 for openvpn-devel@lists.sourceforge.net; Tue, 07 Dec 2021 17:02:20 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.94.2 (FreeBSD)) (envelope-from ) id 1mudr1-000Idt-OD for openvpn-devel@lists.sourceforge.net; Tue, 07 Dec 2021 18:02:11 +0100 Received: (nullmailer pid 3275903 invoked by uid 10006); Tue, 07 Dec 2021 17:02:12 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Tue, 7 Dec 2021 18:01:56 +0100 Message-Id: <20211207170211.3275837-7-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211207170211.3275837-1-arne@rfc2549.org> References: <20211207170211.3275837-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This code is probably from a time when we could not set the MTU on the Windows tap6 driver. Nowadays we can set the MTU on this device, so this code is a noop now. Signed-off-by: Arne Schwabe --- src/openvpn/init.c | 10 src/openvpn/ssl.c | 2 +- src/openvpn/tun.c | 1 - src/openvpn/tun.h | 4 ---- 4 files changed, 1 insertion(+), 16 de [...] Content analysis details: (0.3 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1mudr8-007aKB-N6 Subject: [Openvpn-devel] [PATCH 06/21] Remove post_open_mtu code 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 This code is probably from a time when we could not set the MTU on the Windows tap6 driver. Nowadays we can set the MTU on this device, so this code is a noop now. Signed-off-by: Arne Schwabe Acked-by: Gert Doering --- src/openvpn/init.c | 10 ---------- src/openvpn/ssl.c | 2 +- src/openvpn/tun.c | 1 - src/openvpn/tun.h | 4 ---- 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 0009bcb72..85d664ad6 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -1809,16 +1809,6 @@ do_open_tun(struct context *c) c->c1.tuntap, c->plugins, c->c2.es, &c->net_ctx); } - /* - * Did tun/tap driver give us an MTU? - */ - if (c->c1.tuntap->post_open_mtu) - { - frame_set_mtu_dynamic(&c->c2.frame, - c->c1.tuntap->post_open_mtu, - SET_MTU_TUN | SET_MTU_UPPER_BOUND); - } - ret = true; static_context = c; #ifndef TARGET_ANDROID diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 8cbb129d2..303e3fe8f 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -1897,7 +1897,7 @@ tls_session_update_crypto_params_do_work(struct tls_session *session, frame_print(frame, D_MTU_INFO, "Data Channel MTU parms"); /* - * mssfix uses data channel framing, which at this point contains + * mssfix uses data channel framing, which at this poipnt contains * actual overhead. Fragmentation logic uses frame_fragment, which * still contains worst case overhead. Replace it with actual overhead * to prevent unneeded fragmentation. diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 75d5eaf7b..12bdd2005 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -6071,7 +6071,6 @@ tuntap_get_mtu(struct tuntap *tt) &mtu, sizeof(mtu), &mtu, sizeof(mtu), &len, NULL)) { - tt->post_open_mtu = (int)mtu; msg(D_MTU_INFO, "TAP-Windows MTU=%d", (int)mtu); } } diff --git a/src/openvpn/tun.h b/src/openvpn/tun.h index aa1e47b5a..d4657537c 100644 --- a/src/openvpn/tun.h +++ b/src/openvpn/tun.h @@ -214,10 +214,6 @@ struct tuntap #endif /* used for printing status info only */ unsigned int rwflags_debug; - - /* Some TUN/TAP drivers like to be ioctled for mtu - * after open */ - int post_open_mtu; }; static inline bool