| Message ID | 20260406072617.27790-1-gert@greenie.muc.de |
|---|---|
| State | New |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:7000:d1c6:b0:83c:d90d:321 with SMTP id ly6csp1259309mab;
Mon, 6 Apr 2026 00:26:33 -0700 (PDT)
X-Forwarded-Encrypted: i=2;
AJvYcCVo5NvQnQ8viYMibMMXoqwvtavCYe+PS7zqdIqZziv6AXj/5QCH0YDW+Vc/UQBIX7v8yHy1zUlOixY=@openvpn.net
X-Received: by 2002:a05:6830:488e:b0:7d7:eabb:2a5 with SMTP id
46e09a7af769-7dbb7545cccmr7850239a34.24.1775460393149;
Mon, 06 Apr 2026 00:26:33 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1775460393; cv=none;
d=google.com; s=arc-20240605;
b=VUDr7nSqV0hxJL3LpIHkfJYavAjfyc0wOVi0RZDn8zyV58n20hyGa9F7EuLrEpSKQv
mYFlhGXmrzoMo+Px5dInzB1YEStGQP1m9b1eP55ggscNvWF/3CkCFZJjXhE/W/PSaMHZ
ppyndQf8NR0r1ykuBN/JEpRyoD411/qP4YbJFuvKWzQlRy7YyGrbcRejoiV990EvCdJh
MbXKl9IGZTgBMALdKwPdpfff9VeONk5lfZHDdE3VeX+46gkLFXO1HRotVaZ6yTM7XJ8A
aNRHH+TsPPqigsFKEVRKoqXBk1FsX+bRXvfdpYwWcD40lLkiErQw0nw4vqk5TATIgyXM
oO7w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=errors-to:content-transfer-encoding:list-subscribe:list-help
:list-post:list-archive:list-unsubscribe:list-id:precedence:subject
:mime-version:references:in-reply-to:message-id:date:to:from
:dkim-signature:dkim-signature:dkim-signature;
bh=kWV0fa8wM6WZeEi8Ir58SZMpq+T45qCaf3xNoFhTLPY=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=AWtyM5lLOrCbbG+NW7ESrtq+YGul6ITK+UEvLWMvGAnf/xG896jVS9Lr5H6QvxyxQV
Y2H0z2LeQeSssI2fMZT7GV4TglMqiN1jIz4JaUaKM6hlk9TEZUq9YDFNcMxR5gyf3TmX
oecodWnOWhZjXmztxFw3TgTqVMRfcDOuAt5P/s1npeDP3OSOBDspZc/Ctkkk2cSBYqPU
SzJSHps6+3beoPnshvu6gSyc3sdL1JJAvCuliFV8Ko5F/22W+jZu3lyjjeJ1enQSvYuQ
i3R8vSPGpOLwY6fuzPuuxFos5RLTMIL/QHu2vPWVeqCxJE/s9u5h7D+/9mu1Bomvcse5
DM1w==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=QvkLyyAp;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=Rk81ZQaa;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=Y2jYJRKc;
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;
dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de
Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7])
by mx.google.com with ESMTPS id
46e09a7af769-7dbd7c89119si3696839a34.0.2026.04.06.00.26.32
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Mon, 06 Apr 2026 00:26:32 -0700 (PDT)
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=pass header.i=@lists.sourceforge.net header.s=beta
header.b=QvkLyyAp;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=Rk81ZQaa;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=Y2jYJRKc;
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;
dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:
List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:
Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender:
Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;
bh=kWV0fa8wM6WZeEi8Ir58SZMpq+T45qCaf3xNoFhTLPY=; b=QvkLyyApB9elvzo2jNYWmJVucN
KxGZSp4qC7VDQ1rYNc7CvKBxqF9j6ZyengKFrSZXU8+B3QF4kitTED8D3yw4c7qRjbN88LN2wJPD6
BgVxMfDPDglbTJpmppJbxNiHtVslwvMLSQ8qh3RQ7SHsG2O7rF6SvP+syZEtjhHI+vvU=;
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 <openvpn-devel-bounces@lists.sourceforge.net>)
id 1w9eLr-00023t-GI;
Mon, 06 Apr 2026 07:26:28 +0000
Received: from [172.30.29.66] (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 <gert@blue4.greenie.muc.de>) id 1w9eLp-00023l-9A
for openvpn-devel@lists.sourceforge.net;
Mon, 06 Apr 2026 07:26:26 +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=a3iFs1oEt4NHgsd54TYuYukoZu8ixT/gMKwf9X9za1U=; b=Rk81ZQaa0ZfJK0qCJHJuT9U4I0
we31CvjemMWuLp9XsCX5MYqDaXYGTk6rnZ/Fe1S08c+6W87qOQOZXX7j/BotPGSzn0vdpxpC1wXfG
+vD/Fg3EHRXEIBt6ehGb0j6fWUldPnA4w5750sN4hhnBTcfmIimE4W25qccPDeIw2/yQ=;
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=a3iFs1oEt4NHgsd54TYuYukoZu8ixT/gMKwf9X9za1U=; b=Y2jYJRKc9s/GInmVri6ee+uigd
onX2KyjeRfDynp9TYPOw8G1MBOx5z7LZfWkFw95Rup3YWm0/IBtij+65Wxj3Ug1LuP3BVgW/QsGFt
liy9/hS4i7ytLop5GlqSwWUkvEJGV8P57ZUmmLbOj1Tdxwvl2Qd/LZW9rI/P7u/QJawE=;
Received: from [193.149.48.129] (helo=blue.greenie.muc.de)
by sfi-mx-2.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95)
id 1w9eLo-0006bp-NH for openvpn-devel@lists.sourceforge.net;
Mon, 06 Apr 2026 07:26:25 +0000
Received: from blue.greenie.muc.de (localhost [127.0.0.1])
by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 6367QHVD027808
for <openvpn-devel@lists.sourceforge.net>; Mon, 6 Apr 2026 09:26:17 +0200
Received: (from gert@localhost)
by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 6367QHeb027807
for openvpn-devel@lists.sourceforge.net; Mon, 6 Apr 2026 09:26:17 +0200
From: Gert Doering <gert@greenie.muc.de>
To: openvpn-devel@lists.sourceforge.net
Date: Mon, 6 Apr 2026 09:26:11 +0200
Message-ID: <20260406072617.27790-1-gert@greenie.muc.de>
X-Mailer: git-send-email 2.52.0
In-Reply-To:
<gerrit.1775421558000.Ied966413948cf3c935a8a1eb91172ef7a6948bdd@gerrit.openvpn.net>
References:
<gerrit.1775421558000.Ied966413948cf3c935a8a1eb91172ef7a6948bdd@gerrit.openvpn.net>
MIME-Version: 1.0
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software,
running on the system "sfi-spamd-2.hosts.colo.sdot.me",
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: Frank Lichtenheld <frank@lichtenheld.com> It returned
a constant value so it didn't actually mean anything. While here also make
it static.
Content analysis details: (1.3 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
X-Headers-End: 1w9eLo-0006bp-NH
Subject: [Openvpn-devel] [PATCH v1] push: Make prepare_push_reply return void
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>
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?1861705157471368164?=
X-GMAIL-MSGID: =?utf-8?q?1861705157471368164?=
|
| Series |
[Openvpn-devel,v1] push: Make prepare_push_reply return void
|
|
Commit Message
Gert Doering
April 6, 2026, 7:26 a.m. UTC
From: Frank Lichtenheld <frank@lichtenheld.com> It returned a constant value so it didn't actually mean anything. While here also make it static. Identified by cppcheck. Change-Id: Ied966413948cf3c935a8a1eb91172ef7a6948bdd Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Gert Doering <gert@greenie.muc.de> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1616 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1616 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering <gert@greenie.muc.de>
Comments
Interesting find. I guess someone in some distant past assumed that
we might see failure modes for prepare_push_reply()...
stare-at-code says "this must be fine", but as it affects server code,
I subjected it to the t_server testbed which does excercise PUSH quite
a bit :-) - and everything still works.
Your patch has been applied to the master branch.
commit 5d7068fa181edd472cb55889bd8fdfe246ecede4
Author: Frank Lichtenheld
Date: Mon Apr 6 09:26:11 2026 +0200
push: Make prepare_push_reply return void
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1616
Message-Id: <20260406072617.27790-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36514.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/src/openvpn/push.c b/src/openvpn/push.c index 835c433..564ce86 100644 --- a/src/openvpn/push.c +++ b/src/openvpn/push.c @@ -631,10 +631,8 @@ * @param c context structure storing data for VPN tunnel * @param gc gc arena for allocating push options * @param push_list push list to where options are added - * - * @return true on success, false on failure. */ -bool +static void prepare_push_reply(struct context *c, struct gc_arena *gc, struct push_list *push_list) { struct tls_multi *tls_multi = c->c2.tls_multi; @@ -734,8 +732,6 @@ client_max_mtu, o->ce.tun_mtu, o->ce.tun_mtu); } } - - return true; } static bool @@ -1011,7 +1007,8 @@ struct push_list push_list = { 0 }; struct gc_arena gc = gc_new(); - if (prepare_push_reply(c, &gc, &push_list) && send_push_reply(c, &push_list)) + prepare_push_reply(c, &gc, &push_list); + if (send_push_reply(c, &push_list)) { ret = PUSH_MSG_REQUEST; c->c2.sent_push_reply_expiry = now + 30;