From patchwork Fri Jun 24 02:26:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 2552 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director14.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id 0ElBHdyttWKUSgAAIUCqbw (envelope-from ) for ; Fri, 24 Jun 2022 08:28:12 -0400 Received: from proxy6.mail.ord1d.rsapps.net ([172.30.191.6]) by director14.mail.ord1d.rsapps.net with LMTP id mDEPHdyttWLodwAAeJ7fFg (envelope-from ) for ; Fri, 24 Jun 2022 08:28:12 -0400 Received: from smtp27.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy6.mail.ord1d.rsapps.net with LMTPS id YK7ZHNyttWL2FgAAQyIf0w (envelope-from ) for ; Fri, 24 Jun 2022 08:28:12 -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: smtp27.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=none (p=nil; dis=none) header.from=lichtenheld.com X-Suspicious-Flag: YES X-Classification-ID: 1c9b3b76-f3b9-11ec-a5e2-5254003773d7-1-1 Received: from [216.105.38.7] ([216.105.38.7:47166] helo=lists.sourceforge.net) by smtp27.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 0D/DF-12939-BDDA5B26; Fri, 24 Jun 2022 08:28:12 -0400 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1o4iP4-0007Wd-OL; Fri, 24 Jun 2022 12:27:13 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1o4iP2-0007WW-Rq for openvpn-devel@lists.sourceforge.net; Fri, 24 Jun 2022 12:27:11 +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: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jAyAnVGYTcTWZiZhZsArEZAlvbk6IKN/hcuKJtAATJE=; b=VGHUIMmrsHnqymY+iUMP90Z7Qi ldtz8EUAZvU46qQayrxLlaeJWb7LhgWHhUTp5cu/dWFS4twLCyZKrHPYRRXynVBVCV8YFVX6XhJ3U L1j3y9wsXIuhcEssYpCejdkTz2vbMu2MpiCRT9KunikgECGQ90oGBFlWPtZ5eD9nlOb0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version: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:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=jAyAnVGYTcTWZiZhZsArEZAlvbk6IKN/hcuKJtAATJE=; b=T vSGgdZs0/xxKEAKlj7CNGNZ5ArTjBdrnKgSGV11SvaHYiaBQW5c9dK65jxs/Mf4tcMDfWyaWpHyhC yhY/l8oFtZ9+Vff7GlMP9tjbbLTNWW9f3orGD354H4A/+3j36MBfd1UbxeqeT5yaGYOl2T/OXoVe4 OmjT0/62vfWiCRkw=; Received: from mout-p-102.mailbox.org ([80.241.56.152]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1o4iOw-0005Qq-GT for openvpn-devel@lists.sourceforge.net; Fri, 24 Jun 2022 12:27:11 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4LTxFY3VFsz9sQt for ; Fri, 24 Jun 2022 14:26:57 +0200 (CEST) From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Fri, 24 Jun 2022 14:26:57 +0200 Message-Id: <20220624122657.28675-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4LTxFY3VFsz9sQt 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: Doesn't make sense to test with fragment, if the code ignores it. Signed-off-by: Frank Lichtenheld --- tests/unit_tests/openvpn/test_crypto.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Content analysis details: (-0.7 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.152 listed in list.dnswl.org] 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: 1o4iOw-0005Qq-GT Subject: [Openvpn-devel] [PATCH] test_crypto: fix test_occ_mtu_calculation with --disable-fragment 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 Doesn't make sense to test with fragment, if the code ignores it. Signed-off-by: Frank Lichtenheld Acked-By: Arne Schwabe --- tests/unit_tests/openvpn/test_crypto.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit_tests/openvpn/test_crypto.c b/tests/unit_tests/openvpn/test_crypto.c index 83572b82..aec4e049 100644 --- a/tests/unit_tests/openvpn/test_crypto.c +++ b/tests/unit_tests/openvpn/test_crypto.c @@ -299,13 +299,15 @@ test_occ_mtu_calculation(void **state) linkmtu = calc_options_string_link_mtu(&o, &f); assert_int_equal(linkmtu, 1445); +#if defined(ENABLE_FRAGMENT) /* secret, comp-lzo yes, cipher BF-CBC, auth SHA1, fragment 1200 */ o.ce.fragment = 1200; linkmtu = calc_options_string_link_mtu(&o, &f); assert_int_equal(linkmtu, 1449); + o.ce.fragment = 0; +#endif o.comp.alg = COMP_ALG_UNDEF; - o.ce.fragment = 0; #endif /* TLS mode */ @@ -350,7 +352,7 @@ test_occ_mtu_calculation(void **state) assert_int_equal(linkmtu, 1449); -#if defined(USE_COMP) +#if defined(USE_COMP) && defined(ENABLE_FRAGMENT) o.comp.alg = COMP_ALG_LZO; /* tls client, auth SHA1, cipher AES-256-GCM, fragment, comp-lzo yes */