| Message ID | 20230112000435.14119-1-a@unstable.cc |
|---|---|
| State | Rejected |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp4779969dyk;
Wed, 11 Jan 2023 16:05:30 -0800 (PST)
X-Google-Smtp-Source:
AMrXdXuLSBw8XOR9+DReS5XANU+8CcBgZZL0g4R4ywjCaSS2uQ3kFUYsKpAbIHOB8OBZsExtWFlO
X-Received: by 2002:a05:6830:1e2f:b0:67a:1598:de18 with SMTP id
t15-20020a0568301e2f00b0067a1598de18mr34984636otr.6.1673481930193;
Wed, 11 Jan 2023 16:05:30 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1673481930; cv=none;
d=google.com; s=arc-20160816;
b=OFh4R3SlXNTrfVFY0KlclD/JFG7fJ9+hFv3HIjGy0Lg/YkftdDeq/7l2mYByulBVYv
ITtYfCoddGy49jhiSeoovEznLLP//P47Eky5AAVXOvOhbmMUHTDaSppYOd07QuW0q4OD
VdGIXCZnDtlRUUQXiP9NKwnX9f1jkhZR+XlMbO1x6+zue6RVpU0kd9REKQUwzggJ1/jE
Pju6XKcgZoFZHtBQj2XyW3ICGyYrk/UrOBY/oYe2hiou0VrT1EwOy5pKnUMvBTrGPhbE
suBY4RuYM3z/nSfWEFMqsfuMZ2Kjv+4tctwtUzs561wV2PgLmwn0W3RpV/p7L1QWAP1K
eAIQ==
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=xgPne48JxfbSgSh1c2gJnqnfTekV9gIMq0T26QYw844=;
b=WD/nyV2DjwFPm9x2qlDAX3lqlHRtA9EPps8z0yioGEaDNtdwazwo+jHfEJJTI6U/0j
AEFKmi4YgKQCsjO3rKpCQ57Jq1SOuP0icNxCCGKJm1dlSQYAJeDMHs33xzeQL45jOma3
8ez++NxuakSSDUvq+0UgS/HKriRdCO4rGUbSiTy2yJoc8SYQfVoCnmaS2a2K3mfeRdg/
i5YW7WdJ6n5+7GFaebkre+59Cr+6ytqM/ws10ga7UioZ/+nx6GkMSIO24NIQb0qCMmr9
qJfd1AMm8u8N59Z2/6aGJ9UeDqw+fKiwajFOEw3C/UKoSYkToizWNJpLHWdhBH1pYebr
fCxw==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=KzPjEiEQ;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=axsFcMoX;
dkim=fail header.i=@unstable.cc header.s=20220809-q8oc
header.b=Y9fWL1Zr;
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
b1-20020a056830104100b0067075b50de4si13365563otp.257.2023.01.11.16.05.29
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Wed, 11 Jan 2023 16:05:30 -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=KzPjEiEQ;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=axsFcMoX;
dkim=fail header.i=@unstable.cc header.s=20220809-q8oc
header.b=Y9fWL1Zr;
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 <openvpn-devel-bounces@lists.sourceforge.net>)
id 1pFl5G-0003Jz-OR;
Thu, 12 Jan 2023 00:04:41 +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 <a@unstable.cc>) id 1pFl5F-0003Jt-0c
for openvpn-devel@lists.sourceforge.net;
Thu, 12 Jan 2023 00:04:40 +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=/VvHctk+f7F8umSM1h1mpxuaY2Ydwwx1XjXtk2v7KUo=; b=KzPjEiEQgpL2jZDX/F3FCx29NP
FJiPcwxrF2mZ9q0I/keeDl1OcpFoH3HFR9VJNKUlkg4BG529h3hJwrgZVtJ+g2TJqnV/gTwodBdZy
NBB2YZYnObYMMUSTBQZqW/dABe09Of9Kp2h+YXvhTuTwaXdCCsOrN6CcstbHAaMVrp7Y=;
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=/VvHctk+f7F8umSM1h1mpxuaY2Ydwwx1XjXtk2v7KUo=; b=a
xsFcMoXfMD/I1y1L147YHH9F4Xmr9Yu4LURj1ti3oLnMIFSL/WZpATco6pGGiYc5Nllz97JfHcXkZ
YDekravTKyjJw0Icu5YfuX58YKlfH5i3TgekFE5aXRr1AferMoZmXMLU31tp6F1P4Gl9S6DdwHQEu
nqx8AJn6FNkefN0g=;
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 1pFl56-0004id-Mx for openvpn-devel@lists.sourceforge.net;
Thu, 12 Jan 2023 00:04:37 +0000
Received: from smtpauth2.co-bxl (smtpauth2.co-bxl [10.2.0.24])
by wilbur.contactoffice.com (Postfix) with ESMTP id D941CD04;
Thu, 12 Jan 2023 01:04:24 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1673481864;
s=20220809-q8oc; d=unstable.cc; i=a@unstable.cc;
h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Transfer-Encoding;
l=1361; bh=/VvHctk+f7F8umSM1h1mpxuaY2Ydwwx1XjXtk2v7KUo=;
b=Y9fWL1ZrlDI321gteQVTkD43nzl2f4yRPw288Dq1OXjdTjE64xJRY2HNQ0x0IWxY
ZbXyY3CET9kDXclHZeOuFH+9hqycKee0aCECvVCrJ6t4pKLN67JoAavhZX5IlqHjnbd
LOXi8OOg3o7HOKFMh86lF2e4v9V2VHZSAU5Tq2gYtGTMoD5bymniRJ345KDuuHbeYkb
bif2yxnNn42GZAogfFLQU3gCYhepFvZIPVVRG2FSphYkR0zHRZplKFjyPKD8ZmYBz7Y
q5uLXPGZsMQDVmPSQPHpBgO4DDGpaiOMR8fmM+XqyfrUCfY4BOT7huq1rdDC+WeAcNP
GpVLT5M0Gg==
Received: by smtp.mailfence.com with ESMTPSA ;
Thu, 12 Jan 2023 01:04:22 +0100 (CET)
From: Antonio Quartulli <a@unstable.cc>
To: openvpn-devel@lists.sourceforge.net
Date: Thu, 12 Jan 2023 01:04:35 +0100
Message-Id: <20230112000435.14119-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.20
X-ContactOffice-Account: com:375058688
X-Spam-Score: -0.9 (/)
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: When a peer is removed with reason "ping expire", we should
kill the instance with SIGUSR1 and not SIGTERM Cc: Arne Schwabe
<arne@rfc2549.org>
Signed-off-by: Antonio Quartulli <a@unstable.cc> -- Arne, I am not 100% sure
why but it seems for ping-restart we always use SIGUSR1, right? but the DCO
handling code was apparently using SIGTERM.
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 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.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 Message has at least one valid DKIM or DK signature
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
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
X-Headers-End: 1pFl56-0004id-Mx
Subject: [Openvpn-devel] [PATCH] dco: send SIGUSR1 upon ping timeout
X-BeenThere: openvpn-devel@lists.sourceforge.net
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <openvpn-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel>
List-Post: <mailto:openvpn-devel@lists.sourceforge.net>
List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe>
Cc: Antonio Quartulli <a@unstable.cc>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: openvpn-devel-bounces@lists.sourceforge.net
X-getmail-retrieved-from-mailbox: Inbox
X-GMAIL-THRID: =?utf-8?q?1754772988167723815?=
X-GMAIL-MSGID: =?utf-8?q?1754772988167723815?=
|
| Series |
[Openvpn-devel] dco: send SIGUSR1 upon ping timeout
|
|
Commit Message
Antonio Quartulli
Jan. 12, 2023, 12:04 a.m. UTC
When a peer is removed with reason "ping expire", we should kill the
instance with SIGUSR1 and not SIGTERM
Cc: Arne Schwabe <arne@rfc2549.org>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
--
Arne, I am not 100% sure why but it seems for ping-restart we always use
SIGUSR1, right? but the DCO handling code was apparently using SIGTERM.
What do you think?
---
src/openvpn/multi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
Am 12.01.23 um 01:04 schrieb Antonio Quartulli: > When a peer is removed with reason "ping expire", we should kill the > instance with SIGUSR1 and not SIGTERM > > Cc: Arne Schwabe <arne@rfc2549.org> > Signed-off-by: Antonio Quartulli <a@unstable.cc> > -- > > Arne, I am not 100% sure why but it seems for ping-restart we always use > SIGUSR1, right? but the DCO handling code was apparently using SIGTERM. > > What do you think? This makes no difference in p2mp mode. Arne
Hi, On Thu, Jan 12, 2023 at 02:52:33AM +0100, Arne Schwabe wrote: > Am 12.01.23 um 01:04 schrieb Antonio Quartulli: > > Arne, I am not 100% sure why but it seems for ping-restart we always use > > SIGUSR1, right? but the DCO handling code was apparently using SIGTERM. > > > > What do you think? > > This makes no difference in p2mp mode. This is how I remember the code, from the "incoming explicit-exit-notify vs. p2p/p2mp server" testing. Logging is different for SIGUSR1 vs. SIGTERM instances ("restarting / terminating client instance" or something like that) but *then* the same thing happens. You can't "restart" an incoming session ;-) -> putting this to "Rejected" in patchwork. gert
diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 99123c39..10efffec 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3234,10 +3234,12 @@ process_incoming_del_peer(struct multi_context *m, struct multi_instance *mi, dco_context_t *dco) { const char *reason = "ovpn-dco: unknown reason"; + int signal = SIGTERM; switch (dco->dco_del_peer_reason) { case OVPN_DEL_PEER_REASON_EXPIRED: reason = "ovpn-dco: ping expired"; + signal = SIGUSR1; break; case OVPN_DEL_PEER_REASON_TRANSPORT_ERROR: @@ -3270,7 +3272,7 @@ process_incoming_del_peer(struct multi_context *m, struct multi_instance *mi, mi->context.sig->signal_text = reason; mi->context.c2.dco_read_bytes = dco->dco_read_bytes; mi->context.c2.dco_write_bytes = dco->dco_write_bytes; - multi_signal_instance(m, mi, SIGTERM); + multi_signal_instance(m, mi, signal); } bool