From patchwork Tue Apr 26 06:29:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristof Provost via Openvpn-devel X-Patchwork-Id: 2418 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.31.255.6]) by backend41.mail.ord1d.rsapps.net with LMTP id sFupCUgeaGLMDwAAqwncew (envelope-from ) for ; Tue, 26 Apr 2022 12:31:04 -0400 Received: from proxy14.mail.iad3b.rsapps.net ([172.31.255.6]) by director9.mail.ord1d.rsapps.net with LMTP id iBZ4IEgeaGJ4AgAAalYnBA (envelope-from ) for ; Tue, 26 Apr 2022 12:31:04 -0400 Received: from smtp19.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy14.mail.iad3b.rsapps.net with LMTPS id IN5SGEgeaGKBTgAA+7ETDg (envelope-from ) for ; Tue, 26 Apr 2022 12:31: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: smtp19.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; dkim=fail (signature verification failed) header.d=netgate.com; dmarc=pass (p=none; dis=none) header.from=lists.sourceforge.net X-Suspicious-Flag: YES X-Classification-ID: 436543aa-c57e-11ec-80b1-525400cbaf6c-1-1 Received: from [216.105.38.7] ([216.105.38.7:34402] helo=lists.sourceforge.net) by smtp19.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id D3/CD-20763-74E18626; Tue, 26 Apr 2022 12:31:03 -0400 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.94.2) (envelope-from ) id 1njO4b-00054L-Sc; Tue, 26 Apr 2022 16:29:58 +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.94.2) (envelope-from ) id 1njO4a-00054F-Nl for openvpn-devel@lists.sourceforge.net; Tue, 26 Apr 2022 16:29:57 +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=zblYtllN8uTYYmjoW8f3nLQYEZw6wZVIYBr+itEtTT4=; b=TYwFBta+hFFUXaa3d5zBE5qJTB mxzE89fbka0TSdGIf12X6/E2OEyBcm7ZSEDtQZJF0t0TlZFeO0VYbCXds3t235sMU8Bhk7s+x8xKq 9V01UVH70KVEY1XevC++uG/Nz96CUhKH7Cdlun6imbYeCl0Eh+E/CVNGbMEzVKaV6t18=; 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=zblYtllN8uTYYmjoW8f3nLQYEZw6wZVIYBr+itEtTT4=; b=PpaCkNkORnxkNJMbR4N3YLGxM1 6rc0DMlZJtFGDgvEp5SRnvb+xkLrvySAEeFc/k4Z65e4lLeG8dgT2Le80AC2SlyN1MoMoaLp/ZfZ4 ePTFoM9sT4I7rRvodga6ECOEPGMj4K3avzNnnLD1nSvtkIgYVjTMkHyWZM+l3vqhIis8=; Received: from mail-ed1-f47.google.com ([209.85.208.47]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.94.2) id 1njO4Q-00Ar87-2t for openvpn-devel@lists.sourceforge.net; Tue, 26 Apr 2022 16:29:57 +0000 Received: by mail-ed1-f47.google.com with SMTP id g23so16012323edy.13 for ; Tue, 26 Apr 2022 09:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netgate.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=zblYtllN8uTYYmjoW8f3nLQYEZw6wZVIYBr+itEtTT4=; b=P05B1gV+QsTiQr4OLzc/R+qsIYORLTkPV1Tm0btNvTxsc8Wpy60bF82Yu914+vfITr e+LkTdseOoun68LDFRuFH6nNQWVyLi7OrVipa9XLdLGvGZpU6Ak5fpvKLOBHE3hzwBHW TSXTHZQBFeCHQfMJWAVcUmcxkHiGAtafgnqrw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zblYtllN8uTYYmjoW8f3nLQYEZw6wZVIYBr+itEtTT4=; b=3ZzvF6+MG/lxOt4kixPLyEiGxJ3gfwUoHsnry4XPhFlpBQyI22G3KLGNqpQ/3ly7wl LvVMe02JLWWgznlt5xTfKjMCT3pP+U4Nw+71z2ipriA6/q8K3YviYIus1uBSZjsmd3Ta Hu0XMIPR1jBAL3ImRARZIMcexoI9GMMcIqS/d64d/helbwtozF1ejBbhTfwxRVBtXQQv jeNbruIV40zROKkMK6UvCYt2G0dFzfDaxmdCFRslJKZWqGxNvMf8l6KcROktmGz6PNmp rUSJ4DdETtPAGH9TJmfzZADujOmoTekQa0T4uODP9FSDnN2O3xj4DsJfU5qFV8w+SrvP Eviw== X-Gm-Message-State: AOAM530QXhsOFrmSFzQRyJCQ3Tu/Hfdti/umQ41gV47tZ9wIRyGbtGe5 jEZtpQQE/O3qEPkOdnXG2IRgLis2CL8lpA== X-Google-Smtp-Source: ABdhPJyG9oXTnFUp0VR0yo8Ovastr7w1s1R/mmspdKHeJrddfs7/szC1dsjTErRjBZv8/tqYLN7KCg== X-Received: by 2002:a05:6402:2363:b0:425:bc13:4c8b with SMTP id a3-20020a056402236300b00425bc134c8bmr24252721eda.140.1650990579031; Tue, 26 Apr 2022 09:29:39 -0700 (PDT) Received: from nut.jupiter.sigsegv.be (ptr-8rgvk5277arubwggeqg.18120a2.ip6.access.telenet.be. [2a02:1811:240d:2900:f602:70ff:feae:6e98]) by smtp.googlemail.com with ESMTPSA id l14-20020a170906644e00b006e4dae79576sm5267687ejn.14.2022.04.26.09.29.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:29:38 -0700 (PDT) To: openvpn-devel Date: Tue, 26 Apr 2022 18:29:34 +0200 Message-Id: <20220426162934.12938-2-kprovost@netgate.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426162934.12938-1-kprovost@netgate.com> References: <20220426162934.12938-1-kprovost@netgate.com> 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: From: Kristof Provost Handle the DCO driver telling us that the peer went away, even if we're not running in multi-instance mode. Signed-off-by: Kristof Provost --- src/openvpn/forward.c | 6 ++++++ 1 file changed, 6 insertions(+) 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.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.47 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.47 listed in list.dnswl.org] X-Headers-End: 1njO4Q-00Ar87-2t Subject: [Openvpn-devel] [PATCH] Handle (DCO) timeouts in client mode 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: , X-Patchwork-Original-From: Kristof Provost via Openvpn-devel From: Kristof Provost via Openvpn-devel Reply-To: Kristof Provost Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Kristof Provost Handle the DCO driver telling us that the peer went away, even if we're not running in multi-instance mode. Signed-off-by: Kristof Provost --- src/openvpn/forward.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index 9ddea439..25fa300f 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -1111,6 +1111,12 @@ process_incoming_dco(struct context *c) dco_do_read(dco); + if (dco->dco_message_type == OVPN_NOTIF_DEL_PEER) + { + register_signal(c, SIGTERM, "ping timeout"); + return; + } + if (dco->dco_message_type != OVPN_CMD_PACKET) { msg(D_DCO_DEBUG, "%s: received message of type %u - ignoring", __func__,