From patchwork Fri Apr 22 03:40:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 2401 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director13.mail.ord1d.rsapps.net ([172.30.191.6]) by backend41.mail.ord1d.rsapps.net with LMTP id yOmtJ3++YmJ0VAAAqwncew (envelope-from ) for ; Fri, 22 Apr 2022 10:41:03 -0400 Received: from proxy13.mail.ord1d.rsapps.net ([172.30.191.6]) by director13.mail.ord1d.rsapps.net with LMTP id 4EmZBYC+YmKTYAAA91zNiA (envelope-from ) for ; Fri, 22 Apr 2022 10:41:04 -0400 Received: from smtp5.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy13.mail.ord1d.rsapps.net with LMTPS id 6HtLBYC+YmJzeQAAgjf6aA (envelope-from ) for ; Fri, 22 Apr 2022 10:41:04 -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: smtp5.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=rfc2549.org X-Suspicious-Flag: YES X-Classification-ID: 3be0e40e-c24a-11ec-8dd6-525400d73c44-1-1 Received: from [216.105.38.7] ([216.105.38.7:55812] helo=lists.sourceforge.net) by smtp5.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 19/B2-31357-F7EB2626; Fri, 22 Apr 2022 10:41:03 -0400 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 1nhuS4-0005ph-86; Fri, 22 Apr 2022 14:40:03 +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 1nhuS3-0005oq-BV for openvpn-devel@lists.sourceforge.net; Fri, 22 Apr 2022 14:40:02 +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=JNT5Pi2Ll0+IKzdQGj7tj73RNa6mUdv491qPs/qkEdA=; b=m9RywAlk1OLA5oh8xV/HGgUxro Wo3I+lXVINCoOVOHyy5L3UxpPJupk8Bzwc2USQYy47DXJzWclokQ49tx94759+Xj7keoVnWXvPoqF NG1wpHJp37NjelHv3WexBMYQEp1R+2CfNsl4i7y47ZRY39F+0wbQSOI1abR3DkwZK8jw=; 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=JNT5Pi2Ll0+IKzdQGj7tj73RNa6mUdv491qPs/qkEdA=; b=E4VkO/c9lmE6YPVy5OatNgRKXi IBMJPBPf5QzcrWg3tWXemtc1qglEUUQCcdKHtGPxXkFFU0SQTHdsxwMUSGHfNmQgN6yh12lxZQQWD C2eEUklKfW03qNIkXcUfC/V0EAjbH0aEl2TJLI28bHeAkCfFu6MMxiUkDOOoW6OEXCZM=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1nhuS0-00068J-OB for openvpn-devel@lists.sourceforge.net; Fri, 22 Apr 2022 14:40:01 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1nhtWY-0008sG-I7 for openvpn-devel@lists.sourceforge.net; Fri, 22 Apr 2022 15:40:38 +0200 Received: (nullmailer pid 3801291 invoked by uid 10006); Fri, 22 Apr 2022 13:40:38 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Fri, 22 Apr 2022 15:40:31 +0200 Message-Id: <20220422134038.3801239-3-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220422134038.3801239-1-arne@rfc2549.org> References: <20220422134038.3801239-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Report: Spam detection software, running on the system "util-spamd-2.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: Enabling this test produces compile errors and by the looks of it the test has been broken for many years. --- src/openvpn/init.c | 5 ---- src/openvpn/packet_id.c | 56 [...] Content analysis details: (0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1nhuS0-00068J-OB Subject: [Openvpn-devel] [PATCH 02/28] Remove dead PID_TEST 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 Enabling this test produces compile errors and by the looks of it the test has been broken for many years. Acked-by: Gert Doering --- src/openvpn/init.c | 5 ---- src/openvpn/packet_id.c | 56 ----------------------------------------- src/openvpn/packet_id.h | 10 -------- 3 files changed, 71 deletions(-) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index d5be3cf9f..e41bb9d4b 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -791,11 +791,6 @@ init_static(void) init_ssl_lib(); -#ifdef PID_TEST - packet_id_interactive_test(); /* test the sequence number code */ - return false; -#endif - #ifdef SCHEDULE_TEST schedule_test(); return false; diff --git a/src/openvpn/packet_id.c b/src/openvpn/packet_id.c index 494320309..e357909d7 100644 --- a/src/openvpn/packet_id.c +++ b/src/openvpn/packet_id.c @@ -634,59 +634,3 @@ packet_id_debug_print(int msglevel, } #endif /* ifdef ENABLE_DEBUG */ - -#ifdef PID_TEST - -void -packet_id_interactive_test(void) -{ - struct packet_id pid; - struct packet_id_net pin; - bool long_form; - bool count = 0; - bool test; - - const int seq_backtrack = 10; - const int time_backtrack = 10; - - packet_id_init(&pid, seq_backtrack, time_backtrack); - - while (true) - { - char buf[80]; - if (!fgets(buf, sizeof(buf), stdin)) - { - break; - } - update_time(); - if (sscanf(buf, "%lu,%u", &pin.time, &pin.id) == 2) - { - packet_id_reap_test(&pid.rec); - test = packet_id_test(&pid.rec, &pin); - printf("packet_id_test (%" PRIi64 ", " packet_id_format ") returned %d\n", - (int64_t)pin.time, - (packet_id_print_type)pin.id, - test); - if (test) - { - packet_id_add(&pid.rec, &pin); - } - } - else - { - long_form = (count < 20); - packet_id_alloc_outgoing(&pid.send, &pin, long_form); - printf("(%" PRIi64 "(" packet_id_format "), %d)\n", - (int64_t)pin.time, - (packet_id_print_type)pin.id, - long_form); - if (pid.send.id == 10) - { - pid.send.id = 0xFFFFFFF8; - } - ++count; - } - } - packet_id_free(&pid); -} -#endif /* ifdef PID_TEST */ diff --git a/src/openvpn/packet_id.h b/src/openvpn/packet_id.h index bb613282e..410071e26 100644 --- a/src/openvpn/packet_id.h +++ b/src/openvpn/packet_id.h @@ -35,11 +35,6 @@ #include "error.h" #include "otime.h" -/* - * Enables OpenVPN to be compiled in special packet_id test mode. - */ -/*#define PID_TEST*/ - #if 1 /* * These are the types that members of @@ -296,11 +291,6 @@ packet_id_persist_save_obj(struct packet_id_persist *p, const struct packet_id * const char *packet_id_net_print(const struct packet_id_net *pin, bool print_timestamp, struct gc_arena *gc); -#ifdef PID_TEST -void packet_id_interactive_test(void); - -#endif - static inline int packet_id_size(bool long_form) {