From patchwork Tue Apr 26 21:48:28 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: 2419 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director12.mail.ord1d.rsapps.net ([172.30.191.6]) by backend41.mail.ord1d.rsapps.net with LMTP id EIZKM5j1aGKVbAAAqwncew (envelope-from ) for ; Wed, 27 Apr 2022 03:49:44 -0400 Received: from proxy7.mail.ord1d.rsapps.net ([172.30.191.6]) by director12.mail.ord1d.rsapps.net with LMTP id 0NkwB5n1aGKUTAAAIasKDg (envelope-from ) for ; Wed, 27 Apr 2022 03:49:45 -0400 Received: from smtp35.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy7.mail.ord1d.rsapps.net with LMTPS id aCtCB5n1aGIlcQAAMe1Fpw (envelope-from ) for ; Wed, 27 Apr 2022 03:49:45 -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: smtp35.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; 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: 9a05fdfa-c5fe-11ec-a9be-525400a7b7b4-1-1 Received: from [216.105.38.7] ([216.105.38.7:38730] helo=lists.sourceforge.net) by smtp35.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 9E/E1-19503-895F8626; Wed, 27 Apr 2022 03:49:44 -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 1njcPk-0001FN-Ig; Wed, 27 Apr 2022 07:48:43 +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 1njcPi-0001FH-N1 for openvpn-devel@lists.sourceforge.net; Wed, 27 Apr 2022 07:48:41 +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=zDNtMA4ZVWCXeJE9V4mvX2qxd9Fiz7oN0qfraNzw/o0=; b=U1QPSO1Pl+adZuit+SMA/8jOkv 9EJud9X8hcBORAtouYsOyWdbg70FCBJq3J/uwj9FfXP7nmJCxHGg0OCc2VQvLf4XQ37nsJFuCSuAj qwvIRvP9JOQssQwKSmTbZ6f+ywMjdUc02YuCFll0cmRxdVuC4F0jxpPj9xXppCAESQow=; 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=zDNtMA4ZVWCXeJE9V4mvX2qxd9Fiz7oN0qfraNzw/o0=; b=RiksKsNVJ/6XJMg2mQ4OtRZg+D YEQ9RVbbec+q3K6s2Xgw0fCPeT6l/Xhqz4RyFUt0+g5CKssF9FlBcnB36r2X01yJyTAy/HC9fTIfP 7u3WLzskzvivpXcqs04U0wg9BnS4oQoBiGFZdin6poUbeSSR1rwNCJrAlv1oLE61lHIw=; Received: from mail-ed1-f54.google.com ([209.85.208.54]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.94.2) id 1njcPd-00074g-Rl for openvpn-devel@lists.sourceforge.net; Wed, 27 Apr 2022 07:48:41 +0000 Received: by mail-ed1-f54.google.com with SMTP id p18so947427edr.7 for ; Wed, 27 Apr 2022 00:48:37 -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=zDNtMA4ZVWCXeJE9V4mvX2qxd9Fiz7oN0qfraNzw/o0=; b=iP3BkP48qLwzr2zMufngfqgndkOfcndxG2M48PZLARqTdWR0XXgMoz34lTx9XGDMFp 4EVTU+fC42k+dA16zAKfY8ctoSNagvGom3nQau1nc7QBsXH868O3L7xuem2Tod5PoPN6 prnmgx1+LQHscr2WtDzmFWmkASHbpXtafpaN0= 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=zDNtMA4ZVWCXeJE9V4mvX2qxd9Fiz7oN0qfraNzw/o0=; b=BSKc1DuVBd92yVXNrr3ijcBA1onJMNx6fqkP3pkpvFHDnuSzomx7e1C3NCf8bY2RmB BSfOYvgbgnuFS1SDa4/Iu48Vqoom7QqJNCh+yq2o5dIPpLHwhfpt1MBZ3UoihzH7U1W8 VblPJmDs8QyPezh56+dDWIgrlnBlev2dDNFr1RLLr1BwIoParcy20g7Rj8G4TBmvYQbn E3IspkqyHQ6ZNpEHrJQOBkEA9g2j4abFjwlz2yJrHC2RhAM0lZ8uqiQFrK1pIIOmrNWC lbID2BHuIO40kRlzRX+8Letu3jfd1y0bsOaSQMBrVvbiLvTRZgK1xlzbel1W3w6iBcfF yV4g== X-Gm-Message-State: AOAM531eM0pYL45BWNIo8QzXn88Y1nSU1h3HOE2VkRdFo8aQMhnHVFjj 0SuniK+r0eLfE3y7GkNJVV+CkrnUuVU8kA== X-Google-Smtp-Source: ABdhPJxzS3RS2gvT24ZhcY+fAEjpN1faoAFIudYALeY1YKDqZ2LK0vir/wyOZy4TLYy7Yk0QipX33g== X-Received: by 2002:a05:6402:4315:b0:426:155:e4a3 with SMTP id m21-20020a056402431500b004260155e4a3mr4746721edc.324.1651045711252; Wed, 27 Apr 2022 00:48:31 -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 h7-20020a1709060f4700b006e8d0746969sm6191456ejj.222.2022.04.27.00.48.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 00:48:30 -0700 (PDT) To: openvpn-devel Date: Wed, 27 Apr 2022 09:48:28 +0200 Message-Id: <20220427074828.6283-2-kprovost@netgate.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220427074828.6283-1-kprovost@netgate.com> References: <20220427074828.6283-1-kprovost@netgate.com> MIME-Version: 1.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: 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 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.54 listed in list.dnswl.org] 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_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-Headers-End: 1njcPd-00074g-Rl 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..f60c56a8 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) + { + trigger_ping_timeout_signal(c); + return; + } + if (dco->dco_message_type != OVPN_CMD_PACKET) { msg(D_DCO_DEBUG, "%s: received message of type %u - ignoring", __func__,