From patchwork Fri Jan 13 08:07:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 3000 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp185531dyk; Fri, 13 Jan 2023 00:28:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXt++B3O0UpibdR3A02kWyxLOEkkkif3NLS5AlooPXm7QdX4bCK+jAaOvv28EBl77UQMcI7c X-Received: by 2002:a17:902:e345:b0:192:b3d5:44ff with SMTP id p5-20020a170902e34500b00192b3d544ffmr43096682plc.26.1673598504106; Fri, 13 Jan 2023 00:28:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673598504; cv=none; d=google.com; s=arc-20160816; b=vEez9s/WrXOsMq1skf3/XIzX2EH2/OKPNItD90hZYnVGqSd3v0lxZyUm+uLEGUmI/J qrN2mf9r1Ue8JnCz2IjVCYcYTtPYY+S7ChG2AA+29/c01dros99kGYwuqreZGaC1+1BC jHaYv5vNhf7Xkx4mQ1IGvjR9lS7Ok2w5WRZH7h0gBe1xFxkIyv09d9RjxdGBu40UobC4 F09whzzhP920/HYNgNJ4j/v6xuNxRqZxJqiUoQ7aL779aVGLY0oysHT2VG70xbfM6miM em8YYQ5G8j8qkfTYzCcEPytXO7NWGYUF7Fugl72yo/rj2mL75vUvFrjmBDKj9A6QEF6z /tEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:dkim-signature; bh=mOyW/V2RuFNWSNLML+0ZrYwVUqS3l1nO70KN1Sar3zo=; b=wNw3bWL26uEnVrAgH7ZeQNv24r7Ni0bpPJySt8g+xqmV/TlC6TLcEDF9ry/EliawH/ bptuEVMD8sQZDs+mjqE7TyNyNDv6qOjBkWGJiijduhxhCMZxh8LYz9Y54/p9/az9zcn1 64dWzig2xZpHX9x1bd1f0+Z0z1i1HV+XNcxaF55xjCnh/WKylbkMYsuaKQXzPDoVWwmd +ceNW/PkBfNjz/GXTxAh/A5IdKhd3h0+KGqBcHNUQnaW3hVMLXtkzXAYbZf4AYQGSAif 3eZh8BO9C0sViqX1X2BvRR+RryMoTM6xZl8A6IKrvxIJdHvTU8ppv31v5O2e3Qy55Au9 Q6nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=iTHNwZvB; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=FfPdA0oX; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id q16-20020a170902edd000b0017d2c45e8ffsi19543777plk.171.2023.01.13.00.28.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jan 2023 00:28:24 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=iTHNwZvB; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=FfPdA0oX; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net 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.95) (envelope-from ) id 1pGFPU-0000bM-CZ; Fri, 13 Jan 2023 08:27:35 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pGFPQ-0000bB-EW for openvpn-devel@lists.sourceforge.net; Fri, 13 Jan 2023 08:27:31 +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=KhtQf7YXCz0DFXLR7yshAy4VR5KjE/kWmsQ01wFQkQE=; b=iTHNwZvBqas0XUfps7F2l7QOyN IL67yRkBk/dIAFpK0+cEq6gyOJ1DFVPDwL2vn28mlEH63Do0Maz7Gn5K9Tfhp2jOWgklD5l5J8wMz mkuaPl1do/xtBKwlswI0G7XsCe4LUHt37sLDfOoMkl8eJQzR7UEkJVwDbH8MS8GKTbss=; 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=KhtQf7YXCz0DFXLR7yshAy4VR5KjE/kWmsQ01wFQkQE=; b=F fPdA0oXNpWv0lMy0jJIoW8iFYIT8YyU0UumOQ2wUG0d+MwT80VmGEp5unl7XaW+W3wlT+CMaTM1Ot PngB3r06IT+OD+YvoCHPhaISys4w/qkCsrjUbf/5zraF1ld4FXSAExZbW1iVurV0yVqAnKcSBm9ft lBdsG4/q4/ITwpjA=; Received: from vmail1.greenie.net ([195.30.8.66]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pGFPL-002DZN-Mo for openvpn-devel@lists.sourceforge.net; Fri, 13 Jan 2023 08:27:31 +0000 Received: from fbsd14.ov.greenie.net (fbsd14.ov.greenie.net [IPv6:2001:608:0:814:0:0:fb00:14]) by vmail1.greenie.net (8.17.1/8.16.1) with ESMTP id 30D87jgd059789 for ; Fri, 13 Jan 2023 09:07:45 +0100 (CET) Received: from gert (uid 1001) (envelope-from gert@fbsd14.ov.greenie.net) id 6c740 by fbsd14.ov.greenie.net (DragonFly Mail Agent v0.13+ on fbsd14.ov.greenie.net); Fri, 13 Jan 2023 09:07:45 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 13 Jan 2023 09:07:45 +0100 Message-Id: <20230113080745.82783-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (vmail1.greenie.net [IPv6:2001:608:1:995a:20c:29ff:feb8:10eb]); Fri, 13 Jan 2023 09:07:45 +0100 (CET) X-Spam-Score: -2.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: commit 67c4eebdae introduces a new peer disconnect reason (transport disconnected, aka "TCP session closed") which breaks compilation on FreeBSD - OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT not part of [...] Content analysis details: (-2.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.30.8.66 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 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-Headers-End: 1pGFPL-002DZN-Mo Subject: [Openvpn-devel] [PATCH] Fix OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT breakage on FreeBSD+DCO 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 X-GMAIL-THRID: =?utf-8?q?1754895225203944792?= X-GMAIL-MSGID: =?utf-8?q?1754895225203944792?= commit 67c4eebdae introduces a new peer disconnect reason (transport disconnected, aka "TCP session closed") which breaks compilation on FreeBSD - OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT not part of the enum in freebsd_dco.h, and no kernel support for TCP anyway. This patch is an intermediate bandaid, making the offending code in multi.c "linux only" while a better solution is discussed. Signed-off-by: Gert Doering Acked-by: Antonio Quartulli --- src/openvpn/multi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 99123c39..f2559016 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3244,9 +3244,12 @@ process_incoming_del_peer(struct multi_context *m, struct multi_instance *mi, reason = "ovpn-dco: transport error"; break; +#ifdef TARGET_LINUX + /* FIXME: this is linux-only today and breaks FreeBSD compilation */ case OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT: reason = "ovpn-dco: transport disconnected"; break; +#endif case OVPN_DEL_PEER_REASON_USERSPACE: /* We assume that is ourselves. Unfortunately, sometimes these