From patchwork Sat Nov 21 09:47:46 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5758 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:91c9:10b0:11b:d6c:f273 with SMTP id tl9-n1csp353409lad; Sat, 21 Nov 2026 01:48:03 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErFmxoYxnTgFQA1ujcH5g65BulgL3ALiy46WERNLDpJi5HS2OgH7O4Qv6WGQexCyLT0P1s+wfx74gKo=@openvpn.net X-Received: by 2002:a05:693c:83dc:20b0:384:ce59:5e1f with SMTP id 5a478bee46e88-38570e22dbdmr6517968eec.26.1795254483255; Sat, 21 Nov 2026 01:48:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795254483; cv=none; d=google.com; s=arc-20260327; b=Wvc2UuVUwkkWRiNF+woTKr1ggV9IO9+elAjvToUzn2eU0wceVMUN2L02FoiYm9kwe7 mQgO78S7J7HUytxWx86rIrglLAew0qCEIKycdeVhZIJvxciwc+MlEbDMiEVxrut9WEis 6AHTY4M7zOTYQcVm/GALr/CN/03B28HuG3d/8dTa5wVD2wBjS1QbFPDFcIgaQ/tqExtI KLPfp0lVecs/CTyVW82hAI3RWtFFvlggIl6FaMlglkxKAaN5Jt4/iy2nQV7kndkDLzo3 vzb3ElNQunEnkD9CvGuixv3cWD71NV/Vdxdtmr1Datjw/piD2qoMrgOONQo9Lob0Q4Hy RNIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; 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=/8356g9T9qeer8VrXPiW7mN/nMdViVqgRCjnm5BF4XQ=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=QnfBrYgtiT0eQUEZ4t5qh8yc6+YIIaKJoHYesCELmA7u3cB1sBXzLIpklUngNjO/vT CiRPbWAtvR4H24WxzyylCd3oNMkpjHNLgZ8jlxWJDU+Y3Oh7Pn7UN+6SILZDKEhC1dM0 DFwlvVZUnr7mNzeF0RseO6MUhULVaR53mjY8wU4ITOeQU4+XYJphIbBkAzMZpQAd6ldC vmbNHo3uFt8Z0XErxGuyDxCwAlM4HSuuTxXxRYxbqyFTiy/g/w6EBr/WSJQ3a9JlgrXl UqZtx5r++wFqntW/sn+IVUdpgwYoNHRsl+97VF4Aa2qRRIr18S81SnxQ2uePqKOCmth6 hojg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=gETWmUTU; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=es3QO0tB; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=iI6Eqryi; 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 5a478bee46e88-3857b7f5867si13004707eec.31.2026.11.21.01.48.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Nov 2026 01:48:03 -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=pass header.i=@lists.sourceforge.net header.s=beta header.b=gETWmUTU; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=es3QO0tB; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=iI6Eqryi; 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-Unsubscribe-Post: List-Owner; bh=/8356g9T9qeer8VrXPiW7mN/nMdViVqgRCjnm5BF4XQ=; b=gETWmUTUELhhDc DyBET1W+P4CJ4X5GXekBEff2y8guUhunjWsXxJQasfLa1l3G+qfKUsssulu6Jdrg4X01hi5f4OiaC MjE02/qByk64kQqZ9Lcjn+qoE5g/nbw+RY+wBFhG+8JboO1UICNwLFYi50fa1zU4ca7F3vtHDcKQ6 vgg=; 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.100.1) (envelope-from ) id 1xUhhS-000000000DL-0G9F; Sat, 21 Nov 2026 09:48:02 +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.100.1) (envelope-from ) id 1xUhhQ-000000000DB-2rBa for openvpn-devel@lists.sourceforge.net; Sat, 21 Nov 2026 09:48:00 +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-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=E30bz6LnRgw93dwI96BTY0vMEx+qmNNKDW+8AUrxZ+Q=; b=es3QO0tBFWMgpUAbM99cas+mzM NLI5MBmgOhIJSId5rS+cEfRJSX79wrp49ZfAr42T8QrQe2AEgqqWeDzUn9k6ADl2bpc4SmuvIqJE7 5y3wqLWHXPIL2t2RaRobbQVG2o72+pHzNF/sVdW3OwfvOYCXJnN5cwgZ+zvZc5yBerJk=; 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-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=E30bz6LnRgw93dwI96BTY0vMEx+qmNNKDW+8AUrxZ+Q=; b=iI6Eqryi0JHmcmTxTC9UrLX9So GfGACBsiLvfYTa7Fuo10cpKrJ730u5nQlixaYnEtNODn4yqxt1gs7X7wzmMK5zAm0DpldXMwm2I1r lmyDYK1u3cNCd9YBehVgvmI1Xqn11ZBDw+KkfLeBKPrFeetQT3cfXe/nXxgMIKOQ7A7w=; 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.100.1) id 1xUhhP-00000000345-32Z4 for openvpn-devel@lists.sourceforge.net; Sat, 21 Nov 2026 09:48:00 +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 6AL9lrFi028760 for ; Sat, 21 Nov 2026 10:47:53 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6AL9lr8a028759 for openvpn-devel@lists.sourceforge.net; Sat, 21 Nov 2026 10:47:53 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sat, 21 Nov 2026 10:47:46 +0100 Message-ID: <20261121094752.28750-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: 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: Heiko Hund If the last interface GetNrptExcludeData() looked at was not usable, its entry was left with the domains set, and SetNrptExcludeRules() created a rule from it. Clear the unused entry when done. 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: 1xUhhP-00000000345-32Z4 Subject: [Openvpn-devel] [PATCH v1] openvpnserv: don't use stale data for NRPT exclude rules 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: 1882460764779592950 X-GMAIL-MSGID: 1882460764779592950 From: Heiko Hund If the last interface GetNrptExcludeData() looked at was not usable, its entry was left with the domains set, and SetNrptExcludeRules() created a rule from it. Clear the unused entry when done. Change-Id: Ia359824eea8780805a59d19146740afe3630fa0c Signed-off-by: Heiko Hund Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2233 --- 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/+/2233 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Razvan Cojocaru diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 354fe09..24705a9 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -2521,13 +2521,13 @@ { HKEY v4_itfs = INVALID_HANDLE_VALUE; HKEY v6_itfs = INVALID_HANDLE_VALUE; + size_t i = 0; if (!GetInterfacesKey(AF_INET, &v4_itfs) || !GetInterfacesKey(AF_INET6, &v6_itfs)) { goto out; } - size_t i = 0; DWORD enum_index = 0; while (i < data_size) { @@ -2627,6 +2627,11 @@ } out: + /* Clear data left by an interface that was not usable */ + if (i < data_size) + { + ZeroMemory(&data[i], sizeof(data[i])); + } RegCloseKey(v6_itfs); RegCloseKey(v4_itfs); }