From patchwork Thu Aug 18 04:44:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 2697 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director13.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id GOE1F8dQ/mLZJgAAIUCqbw (envelope-from ) for ; Thu, 18 Aug 2022 10:46:31 -0400 Received: from proxy16.mail.iad3b.rsapps.net ([172.31.255.6]) by director13.mail.ord1d.rsapps.net with LMTP id 0HAgF8dQ/mJXSQAA91zNiA (envelope-from ) for ; Thu, 18 Aug 2022 10:46:31 -0400 Received: from smtp17.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy16.mail.iad3b.rsapps.net with LMTPS id QP7jD8dQ/mJ2LwAAPj+4aA (envelope-from ) for ; Thu, 18 Aug 2022 10:46:31 -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: smtp17.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=unstable.cc; dmarc=fail (p=none; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: 8b77aa0e-1f04-11ed-95de-52540094e46f-1-1 Received: from [216.105.38.7] ([216.105.38.7:51400] helo=lists.sourceforge.net) by smtp17.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id EC/8E-11651-6C05EF26; Thu, 18 Aug 2022 10:46:30 -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.95) (envelope-from ) id 1oOgll-0007Nx-MI; Thu, 18 Aug 2022 14:45:13 +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 1oOglj-0007Nq-SQ for openvpn-devel@lists.sourceforge.net; Thu, 18 Aug 2022 14:45:11 +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=8BhvN9RDBjLK2rluQbrjCOf+nyhaz4X60plScZWLYUI=; b=eqbN/V1s4X/yeM3/twji6ALqdh EH41bZHaRPMoDaD39IYWJNSwDeRHZ8EEue5B0mwlSFCMg+ADTGOkuCw62jiDq3LIxNoD47zzh27Sg 50hSExjYMFo8iEQZDJs003Hr0Lt7/M5EDl0Xxg+Npi6dcQLMxlLGa2XhcFM4SMyniP00=; 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=8BhvN9RDBjLK2rluQbrjCOf+nyhaz4X60plScZWLYUI=; b=Z nQtzahi5wgpWZU/i7wAHWJC3UUxJ/mPbSIxkaAhLpTqRSSBsIF03cC2dtACgoosbFFqeit2w8lrbE 1M9qddIdNqOPm33Q6R5EsgP9Z8BlpihKODt6cUc5QT+FWeD/Cd/jnseeYRTG/Zap2MYWdy6FRZoqn qZlt00C2h/Iu5KV0=; Received: from wilbur.contactoffice.com ([212.3.242.68]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1oOglb-0002sD-1G for openvpn-devel@lists.sourceforge.net; Thu, 18 Aug 2022 14:45:11 +0000 Received: from smtpauth2.co-bxl (smtpauth2.co-bxl [10.2.0.24]) by wilbur.contactoffice.com (Postfix) with ESMTP id C960842F3; Thu, 18 Aug 2022 16:44:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1660833887; s=20220809-q8oc; d=unstable.cc; i=a@unstable.cc; h=From:Cc:Date:Message-Id:MIME-Version:Content-Transfer-Encoding; l=771; bh=8BhvN9RDBjLK2rluQbrjCOf+nyhaz4X60plScZWLYUI=; b=C2C24LiDgfywI/l+Y9UzdqE2DWgxU8GQwscPbZiCPzsBpHMRc3hGdBTumtF+Kv9R oP4Lg/yT5ECpO2DiYaoBLyzE2QxPRp2gen8DR9J7YDaAOLDPOqXbb0/95DjFIfIkx5L uVbI+QaMzsE6wdtB0OLssz7N8NES2DUYU/wQAZporCCib5nD8jcs/dJP0R5QegKa6Vl /F0E2qtrULyxjK2vzu76wq++VDR/6WGxaR/czjF/mySWjsj77yWXI1RaMoNgiLhIc4A EEMe9w94owXMrsXVQToX6g8P3H2o59tvVdOJDV317mCMrL8knMTV9qHO5IPN/D/eRiM s6lrU5Chtw== Received: by smtp.mailfence.com with ESMTPSA ; Thu, 18 Aug 2022 16:44:43 +0200 (CEST) From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Thu, 18 Aug 2022 16:44:31 +0200 Message-Id: <20220818144431.208337-1-a@unstable.cc> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, hits=-2.9 required=4.7 symbols=ALL_TRUSTED, BAYES_00, T_SCC_BODY_TEXT_LINE device=10.2.0.1 X-ContactOffice-Account: com:375058688 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: DEL_PEER events can be sent by ovpn-dco to userspace for various reasons. We should trigger the ping timeout reaction only if the reason was "peer has expired". Signed-off-by: Antonio Quartulli --- src/openvpn/forward.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Content analysis details: (-0.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.3.242.68 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: 1oOglb-0002sD-1G Subject: [Openvpn-devel] [PATCH] dco: trigger ping timeout event only if the peer expired 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 DEL_PEER events can be sent by ovpn-dco to userspace for various reasons. We should trigger the ping timeout reaction only if the reason was "peer has expired". Signed-off-by: Antonio Quartulli Acked-by: Gert Doering --- src/openvpn/forward.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index d70b4f52..970be3bf 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -1119,7 +1119,8 @@ process_incoming_dco(struct context *c) dco_do_read(dco); - if (dco->dco_message_type == OVPN_CMD_DEL_PEER) + if ((dco->dco_message_type == OVPN_CMD_DEL_PEER) + && (dco->dco_del_peer_reason == OVPN_DEL_PEER_REASON_EXPIRED)) { trigger_ping_timeout_signal(c); return;