| Message ID | 20260405102209.31528-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 ly6csp844726mab;
Sun, 5 Apr 2026 03:22:22 -0700 (PDT)
X-Forwarded-Encrypted: i=2;
AJvYcCUlmX6vVIWtcxGviunFQ7dFYxMIfTfUFsZA37AsST1IyEgkJwF3fFDm9/l2924R8nX4KB9vaqEZuoM=@openvpn.net
X-Received: by 2002:a05:6808:c222:b0:467:f567:d609 with SMTP id
5614622812f47-46ef7918a06mr4208608b6e.34.1775384542397;
Sun, 05 Apr 2026 03:22:22 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1775384542; cv=none;
d=google.com; s=arc-20240605;
b=BNkfyDcAjda8jEKV90WtDuxp4OcgirQ7ILYDGKOOZClyBgeif287OJaFtXGdYcBwNC
nZDaLn3fzeUjCGgfKbEmO7cdUT92oFOD85LHs5udoExXpMUngSPrUVrFXA5hrKZF2+fu
+L5LlPgp6dLs3ku2scsGoKNkqLyZryH1RutmM1Vs5GeecTpJp+d5AmLbqVwErKPyf3Ci
Uiv+cOZqbBn0WyoSZwP8uZc9hCbKA1M4QsOE3gxxlSUjdlXNF624DAAwzqdkC46UB8+u
0Kv3THpsxjcLDQeiae6dIHxaYvnorsJ6c2g+ls85Sz9k6Gf7zU6TorA0+KpusH58cfAa
/30g==
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=Ndslrkl/3ptFrqh2tOTlbfwpGsYIikWWlUgZPooM/+c=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=ituZoU8ZIngXS7WMAfC0wyIHZ58+rkzOIi0Nqp6xNI19XBCrg64hkuWisZygaiP9jU
/YsiMiXUAZJs0GGcoe+paA7drQcNd5Cb713RAaEHyocoYAh6VlZghEB0eye8dofkyxvG
jltlQZQRHGKCKKWbAqnchUDWrfxZ+MJiwihWWeRfucHfGHufqUg7cq4iYytKC43HAFTR
qJ8f36Kqds8PiLA8Z8DCETZUJqPQa6BWbkoVrfBOm9wIP1xLWRrNNmwDDcSUS2Xouye/
QfLBYlg7d5VhEuL9iO8RWKn/9KOVCDNm3UTh7qNbSMy6R9AdQO4Oeb6A+SyJZNuWCwPs
RGCQ==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=jlg+vTLW;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=S4Sdtrwn;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=LlVDzQ2d;
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-7dbe1fbee13si365211a34.61.2026.04.05.03.22.22
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Sun, 05 Apr 2026 03:22:22 -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=jlg+vTLW;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=S4Sdtrwn;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=LlVDzQ2d;
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=Ndslrkl/3ptFrqh2tOTlbfwpGsYIikWWlUgZPooM/+c=; b=jlg+vTLW89HxmwXvnnlaPJhrPf
haax4wUxvDGp+FR9IfP243P9XTh5pACcAzEvdd/GX6f8LL/SkD6s2Mt/evPdJDYRrcvu3jL5j2tRq
e4f62V3HTuttSo6Lqt7I+GQFno9u2h2kYpl6wBT/Bp19c/gOJMC6IuXJL7XBMoGwr96Y=;
Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com)
by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1w9KcV-0006u0-T8;
Sun, 05 Apr 2026 10:22:19 +0000
Received: from [172.30.29.66] (helo=mx.sourceforge.net)
by sfs-ml-3.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 1w9KcU-0006ts-PG
for openvpn-devel@lists.sourceforge.net;
Sun, 05 Apr 2026 10:22:18 +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=ldLUcGU+NaJzZ1T9UqcHGlBEkLNb0kfOqxF3BT2KDh0=; b=S4SdtrwnqRw6ZhWmp1T4mUNNIQ
k+dgoPpfCvj+MMSirQfnV2yWhLYKCGzWkVxskD7rBYHvfQFa1Di6ELXF+Pw6SN4U2J82k6en0LUE7
E6zGjvih5V7s6RKBOxgmlJwlJVLYoChV7NG+oEWVJgIeAVryDZmzlL5m4sjQftr6f9GM=;
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=ldLUcGU+NaJzZ1T9UqcHGlBEkLNb0kfOqxF3BT2KDh0=; b=LlVDzQ2dAVMutpIgBbMe5m++8i
oZ+ICb8dm58PaZ0eOcya267L2WjRdUSg7ygz58GaQitXv+zmwZjw9OqaiyMmFCYgDgqu8fIu2Gz38
x0zub2TJO224R6zCSqosjcaklbernVZxTSA+6Cp1k38M4uzbcENx1LEiyavylE7/DeNw=;
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 1w9KcT-0004Ns-3O for openvpn-devel@lists.sourceforge.net;
Sun, 05 Apr 2026 10:22:17 +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 635AMAWu031543
for <openvpn-devel@lists.sourceforge.net>; Sun, 5 Apr 2026 12:22:10 +0200
Received: (from gert@localhost)
by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 635AMApO031541
for openvpn-devel@lists.sourceforge.net; Sun, 5 Apr 2026 12:22:10 +0200
From: Gert Doering <gert@greenie.muc.de>
To: openvpn-devel@lists.sourceforge.net
Date: Sun, 5 Apr 2026 12:22:04 +0200
Message-ID: <20260405102209.31528-1-gert@greenie.muc.de>
X-Mailer: git-send-email 2.52.0
In-Reply-To:
<gerrit.1775320419000.Iff5be978817bfc0cd4d78818e7be7b90bad71f3c@gerrit.openvpn.net>
References:
<gerrit.1775320419000.Iff5be978817bfc0cd4d78818e7be7b90bad71f3c@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> By default
the first enum value is 0. But we check whether we set the flag by doing
BOOL dnssec = (msg->flags & nrpt_dnssec) != 0; This can't ever be true.
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: 1w9KcT-0004Ns-3O
Subject: [Openvpn-devel] [PATCH v1] win: Fix nrpt_dnssec flag handling
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?1861625621739928960?=
X-GMAIL-MSGID: =?utf-8?q?1861625621739928960?=
|
| Series |
[Openvpn-devel,v1] win: Fix nrpt_dnssec flag handling
|
|
Commit Message
Gert Doering
April 5, 2026, 10:22 a.m. UTC
From: Frank Lichtenheld <frank@lichtenheld.com> By default the first enum value is 0. But we check whether we set the flag by doing BOOL dnssec = (msg->flags & nrpt_dnssec) != 0; This can't ever be true. Found by cppcheck. Change-Id: Iff5be978817bfc0cd4d78818e7be7b90bad71f3c Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Gert Doering <gert@greenie.muc.de> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1606 --- 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/+/1606 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering <gert@greenie.muc.de>
Comments
Good catch, and obvious bug... and use of enum for a "bit map style"
flags thing was not really a good approach in the first place. Now it
will work ("any value *but* 0 will work"), but when this is extended
to cover "more than 1 flag", going away from the enum would be a good
plan. For the bug fix, a minimal approach is suitable.
I have not tested this beyond "does it compile on Ubuntu/MinGW", but
it looks very obviously correct ("stare at 'git grep nrpt_dnssec'").
Your patch has been applied to the master and release/2.7 branch.
commit 08a19843a184c6cb8850ac9e6bf7ce0cd4d15d37 (master)
commit 2aaa5e4d7c5bae35d7befdebeed065c634292151 (release/2.7)
Author: Frank Lichtenheld
Date: Sun Apr 5 12:22:04 2026 +0200
win: Fix nrpt_dnssec flag handling
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1606
Message-Id: <20260405102209.31528-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36487.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/include/openvpn-msg.h b/include/openvpn-msg.h index bef20cf..ca3267e 100644 --- a/include/openvpn-msg.h +++ b/include/openvpn-msg.h @@ -110,7 +110,7 @@ typedef enum { - nrpt_dnssec + nrpt_dnssec = 1 << 0, } nrpt_flags_t; #define NRPT_ADDR_NUM 8 /* Max. number of addresses */