From patchwork Wed Jan 11 23:50:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 2997 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp4772967dyk; Wed, 11 Jan 2023 15:51:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXuEIZio4UYH8JDDRjmLEI7g6W+lrapXVZlJUS0QuBlRNH16FBfMqce6cvHxG3kJV8Wrdyb+ X-Received: by 2002:a17:902:f20c:b0:193:955:ca55 with SMTP id m12-20020a170902f20c00b001930955ca55mr19440537plc.13.1673481077411; Wed, 11 Jan 2023 15:51:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673481077; cv=none; d=google.com; s=arc-20160816; b=ih+q6KoTmT+Jvmm9qEkiaHUIVtQYTn2pyKsd9xkc/56s3R7k5AfEJBVeUd2H1jpubi N0pV7bc7Kfz+mHJKbdrywJdJbMp/GFh4UuBwo4ANlU7dkFZCAI23gwlwxUBkG8yeDlgt bIHxXJYz/pcPmdhaB/UFOP4fI8lO7U5LQbvetHln5ZDRAdYcoTWa1ewE1BBkFLABmiaW 6X1/tian6+h2zt3j9i4d7h8hIku3BsVPee7TiHSlz7KDilNhcA+VxfUePHoMGSdxnJFm Z8VhxNX09+W27z721WDPd+yUIG6K9BfnQ9VJo6hGCYKF47eGmYEUPYCeWzr9XQI9rkW9 uGEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:cc: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 :dkim-signature; bh=qT9FEPSIBiQnEVtGePZfABP+rZnKGEwZRbSixIiTK2o=; b=j2XPHLLDcytacL/m8o0ZZS9NS8VKPcUsxscR9ez0gCzXqwyCyvly1V6cFPTFR8LpPS 8lLAqLC423GEZRNyWNYs+FuAWYJiikFKaYaU3eB5tvxH8+N7GH2OuYMPlRIGDxWv1cQC l1xKAtTFaR3v9hgYOrYPAEa2QT2y3Y03CBjmLV1Cvd/olfGd3qqgtn8sFFg0qaZ1W5C/ 8qJxM48FE5p8x4+4AfSjvSS9C6+f2IQaFAzRRy0zGGJZZOSM61xgrZ5CEQN3X4/Fj4R1 swiaCQRTtQgqUB339e7w9Ikc5bIrnkv/tMP/F0fVv24s9HpB5jBRL88vcFVs3RGUVYxZ 1ceA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=g9sqq6TD; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=e5PHvIjU; dkim=fail header.i=@unstable.cc header.s=20220809-q8oc header.b=P3WBCJBh; 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 x5-20020a170902ec8500b001930d8a834esi16584865plg.303.2023.01.11.15.51.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2023 15:51:17 -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=g9sqq6TD; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=e5PHvIjU; dkim=fail header.i=@unstable.cc header.s=20220809-q8oc header.b=P3WBCJBh; 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-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pFkrr-0002f9-Q8; Wed, 11 Jan 2023 23:50:51 +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.95) (envelope-from ) id 1pFkrq-0002bF-Bk for openvpn-devel@lists.sourceforge.net; Wed, 11 Jan 2023 23:50:49 +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: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MEjXVC+K8MDgj79ZjM9f71F5oSlNI0BsuXM8kAOYaRw=; b=g9sqq6TDOhO7nY1MQAkvMkC5K2 H62CrlG+b+6cesQZ+uNe1MoymwpsVTLeEVMVEkB6guMccflhlrE3C44SDG+zIXc2eyFEXU0MV8Qmu eE8o+CtANwqWxe7l9TATAzjYd9jYNezBhciLQ15st2sOTV5PPpYwqMaFdQXjhLB+GFXs=; 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: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:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=MEjXVC+K8MDgj79ZjM9f71F5oSlNI0BsuXM8kAOYaRw=; b=e 5PHvIjUhRPDc9d8qGdBxCThFBfxOJga0m4WKssQ2ogysN+Fz3kb31R02bKJjbOUKfRt7i1niaaloY oZtEUao+TgZge+HOuHB5VbNtn7ia1rZ2OHVOnTBOeLRDNEqfqi3GsZlDa2PeEBbKcNbDljscyCqMg UQOKRH2QcFgRV/ns=; Received: from mailout-l3b-97.contactoffice.com ([212.3.242.97]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pFkri-000FQr-59 for openvpn-devel@lists.sourceforge.net; Wed, 11 Jan 2023 23:50:49 +0000 Received: from smtpauth2.co-bxl (smtpauth2.co-bxl [10.2.0.24]) by mailout-l3b-97.contactoffice.com (Postfix) with ESMTP id 2A29E906; Thu, 12 Jan 2023 00:50:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1673481035; s=20220809-q8oc; d=unstable.cc; i=a@unstable.cc; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Transfer-Encoding; l=1724; bh=MEjXVC+K8MDgj79ZjM9f71F5oSlNI0BsuXM8kAOYaRw=; b=P3WBCJBhPQZ9jaSfPb0dc0Wz9D0DO367U5/sn48o3ZnqodmU3TfIKWu8GAA+WzEL 75oCCn1k8xzxKVl6zKtqs8L+oRqBfACnofggNHqskNvm1EZrPAdhLXUbRsbCYYnIaRC qwna1qYu9VBIenFinVl07AnoOYEB+28zZ4DstSkUDnPc3VdXwj7yybWoTfcivFFLCOd 4zppwjbNGyRf9XuIf5yVkDFPrIs9aqWCceUewvDFJuza0Zr2dtQxT0UBsQrgJpapDEG Cexpz6Ocu04u6DJMQxAYcWivsQK7xE7Sv8aC2ans/dosrAWMTDAxJbNgosUgqhVb6wa m9XRIsMBfA== Received: by smtp.mailfence.com with ESMTPSA ; Thu, 12 Jan 2023 00:50:32 +0100 (CET) From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Thu, 12 Jan 2023 00:50:52 +0100 Message-Id: <20230111235052.24855-1-a@unstable.cc> X-Mailer: git-send-email 2.38.2 MIME-Version: 1.0 X-Spam-Flag: NO X-Spam-Status: No, hits=-2.9 required=4.7 symbols=ALL_TRUSTED, BAYES_00 device=10.2.0.1 X-ContactOffice-Account: com:375058688 X-Spam-Score: -0.9 (/) 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: Signed-off-by: Antonio Quartulli --- --no-verify is required upon commit due to changes in ovpn_dco_linux.h Little logging improvement for https://github.com/OpenVPN/ovpn-dco/issues/9 --- src/openvpn/multi.c | 4 ++++ src/openvpn/ovpn_dco_linux.h | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) Content analysis details: (-0.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: unstable.cc] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.3.242.97 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1pFkri-000FQr-59 Subject: [Openvpn-devel] [PATCH] dco: print proper message in case of transport disconnection 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: , Cc: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1754772094304525578?= X-GMAIL-MSGID: =?utf-8?q?1754772094304525578?= Signed-off-by: Antonio Quartulli Acked-by: Lev Stipakov --- --no-verify is required upon commit due to changes in ovpn_dco_linux.h Little logging improvement for https://github.com/OpenVPN/ovpn-dco/issues/9 --- src/openvpn/multi.c | 4 ++++ src/openvpn/ovpn_dco_linux.h | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 77dcaa60..99123c39 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3244,6 +3244,10 @@ process_incoming_del_peer(struct multi_context *m, struct multi_instance *mi, reason = "ovpn-dco: transport error"; break; + case OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT: + reason = "ovpn-dco: transport disconnected"; + break; + case OVPN_DEL_PEER_REASON_USERSPACE: /* We assume that is ourselves. Unfortunately, sometimes these * events happen with enough delay that they can have an order of diff --git a/src/openvpn/ovpn_dco_linux.h b/src/openvpn/ovpn_dco_linux.h index beca1beb..f9a3b827 100644 --- a/src/openvpn/ovpn_dco_linux.h +++ b/src/openvpn/ovpn_dco_linux.h @@ -1,8 +1,8 @@ -/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * OpenVPN data channel accelerator * - * Copyright (C) 2019-2021 OpenVPN, Inc. + * Copyright (C) 2019-2022 OpenVPN, Inc. * * Author: James Yonan * Antonio Quartulli @@ -85,6 +85,7 @@ enum ovpn_del_peer_reason { OVPN_DEL_PEER_REASON_USERSPACE, OVPN_DEL_PEER_REASON_EXPIRED, OVPN_DEL_PEER_REASON_TRANSPORT_ERROR, + OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT, __OVPN_DEL_PEER_REASON_AFTER_LAST };