From patchwork Sat Nov 21 09:46:56 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5757 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:91c9:10b0:11b:d6c:f273 with SMTP id tl9-n1csp353201lad; Sat, 21 Nov 2026 01:47:39 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErHNiYkbz2TGdjr9nF2FRXZFKGCxtlRBMBQsNhKnrl3WgSEmHyDrrgika3rLnweUuqGDLX5+37BoEno=@openvpn.net X-Received: by 2002:a05:7301:dd94:b0:36c:9afe:fcd8 with SMTP id 5a478bee46e88-3856f559cfemr5359664eec.30.1795254459247; Sat, 21 Nov 2026 01:47:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795254459; cv=none; d=google.com; s=arc-20260327; b=smjyjW3tdNk1PFMBs8/bbOWzjgNS/MLc/QTOQpJcJ+A2PTyVmrKmXIrmiYA/8b8na+ MOos+rxBMfQ3sNaucFK0mIdE2vEDjFurXyiXfX7XSxHsRgqnB46o07eTF/IhUtbqouuB AMKJMO/2CkTYmDEyuLF1/O/luS8s3T8bluqNsexqgCgh0AOvG9oNlxfIxuAknZ2L20Xg ZdI3gUG/vG+Py5TbQ0sVhyyruNqZnNMPnJYb8EFAV6EZ4RTBAz294wBnbPeTUA2iaaak XGMYxKpDV6A4AJtPq9FMNnBi05ahuWH5B6CsimaDAHvSwDhbLMl/4nNWySopetgCCwfI RU5A== 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=5G7XnagCK3g7UNJxv423re+PH2+ehW1+SibO1B1I00E=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=oGnO5ogriuArrHOLoheWhaUuOQtH9xZ4SL/9+rLkuASnJDoBWRAn3m7MY+Qfze4JHV qSQzu7re2CdV7BrsSGcVSEQHdGfXADJ3HsL0wtu/RuU+UsJYneH/H9s5WSiEmeGVClRz kc5989XdM9wQQsqQN5Kd8xyFOeIWxxS8T47AoykP+BUoFb77lmMHHxBwui/rBCuiZNk9 59zHWKPfRhAvVN3Xb1DV75L99tvArNxTf4aZICIUUx7stJCYWa/m2Ymrv+V5QW3wstBF /1MFHohwQGTY26kMv6rQzqJJLzLZCBPkdVOTDr5qEZG3GkAWgTdMphz/684UublW/aWw BiKg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=AOxjEuTD; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=CqRiY2+l; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="il5jl/Hf"; 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-38566fd5e30si19616761eec.23.2026.11.21.01.47.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Nov 2026 01:47:39 -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=AOxjEuTD; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=CqRiY2+l; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="il5jl/Hf"; 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=5G7XnagCK3g7UNJxv423re+PH2+ehW1+SibO1B1I00E=; b=AOxjEuTDhR4gNd 1w2NfaP8FcTOREpTYxwvDIIrQbJn1re8RsJOMEWIkr+/THy3CK67DAj0j9+gE4Bck3m1DkNqx4lel C7HI1P0/Ny1BYSuBEu8mHt80sDzdUqPFqPk2jQeyXtGsh4Rm8W2pMrgEuaqv4QrATmvrSDUBgoikl urI=; 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.100.1) (envelope-from ) id 1xUhh4-000000001sZ-0YCr; Sat, 21 Nov 2026 09:47:38 +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.100.1) (envelope-from ) id 1xUhh2-000000001sD-2u6a for openvpn-devel@lists.sourceforge.net; Sat, 21 Nov 2026 09:47:36 +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=iOvZ9G3fu0q9SE8AgDyfFxSqP2kgy8a+BPPbgGCQJ/Q=; b=CqRiY2+lAx0f4koiZHg1gm2WUj 4h+CzalsqCm/wEiibDcH+BOA3A09gLBRVY8i+7ePP4ywLkW+OhEt7QmrlH1Ux9vz8/b9QYSwmA1wX 5jZUuobyRbgcG0+9VaTrnQcirvRTXSOAK7CE6V1lg6vUBUgCq/3xQ5jj/L98STe/iNAw=; 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=iOvZ9G3fu0q9SE8AgDyfFxSqP2kgy8a+BPPbgGCQJ/Q=; b=il5jl/HfEj8jBfrGK0gS8pwUvn +68JLww6SAKVXorQC7N2W423Tg6QY3pmjWFGMj9NjPvzLPVgrLcSRp96laZD2z9Cp5ch5x6iMVhXJ v58fP7Z2sfSAtq5z0qhBgVic7NoUGapmHquP02d5nz1WNSkYKjcMN9JR74qp7l24uV+A=; 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 1xUhgb-0000000032T-1Moj for openvpn-devel@lists.sourceforge.net; Sat, 21 Nov 2026 09:47:10 +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 6AL9l24G028652 for ; Sat, 21 Nov 2026 10:47:02 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6AL9l2Cg028651 for openvpn-devel@lists.sourceforge.net; Sat, 21 Nov 2026 10:47:02 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sat, 21 Nov 2026 10:46:56 +0100 Message-ID: <20261121094701.28638-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-1.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 GetNrptExcludeData() skipped an interface completely if reading its IPv4 or IPv6 name servers error'd, even if the other address family had servers. Use the name servers that could be read instead. 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: 1xUhgb-0000000032T-1Moj Subject: [Openvpn-devel] [PATCH v1] openvpnserv: keep NRPT exclude data if one address family fails 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: 1882460739969270336 X-GMAIL-MSGID: 1882460739969270336 From: Heiko Hund GetNrptExcludeData() skipped an interface completely if reading its IPv4 or IPv6 name servers error'd, even if the other address family had servers. Use the name servers that could be read instead. Change-Id: Id346f35f6ce371b177af7454cd73d3eeccb8ed6c Signed-off-by: Heiko Hund Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2235 --- 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/+/2235 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 32b1688..7ea88a1 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -2580,11 +2580,15 @@ /* Get the IPv4 DNS servers */ DWORD v4_addrs_size = sizeof(data[0].addresses); err = GetItfDnsServersV4(v4_itf, data[i].addresses, &v4_addrs_size); - if (err && err != ERROR_FILE_NOT_FOUND) + if (err) { - MsgToEventLog(M_SYSERR, L"%S: could not read interface %s v4 name servers (%ld)", - __func__, itf_guid, err); - goto next_itf; + if (err != ERROR_FILE_NOT_FOUND) + { + MsgToEventLog(M_SYSERR, L"%S: could not read interface %s v4 name servers (%ld)", + __func__, itf_guid, err); + } + data[i].addresses[0] = '\0'; + v4_addrs_size = 0; } /* Get the IPv6 DNS servers, if there's space left */ @@ -2593,19 +2597,21 @@ if (v6_addrs_size > NRPT_ADDR_SIZE) { HKEY v6_itf; - if (RegOpenKeyExW(v6_itfs, itf_guid, 0, KEY_READ, &v6_itf) != NO_ERROR) + err = RegOpenKeyExW(v6_itfs, itf_guid, 0, KEY_READ, &v6_itf); + if (!err) { - MsgToEventLog(M_SYSERR, L"%S: could not open interface %s v6 registry key", - __func__, itf_guid); - goto next_itf; + err = GetItfDnsServersV6(v6_itf, v6_addrs, &v6_addrs_size); + RegCloseKey(v6_itf); } - err = GetItfDnsServersV6(v6_itf, v6_addrs, &v6_addrs_size); - RegCloseKey(v6_itf); - if (err && err != ERROR_FILE_NOT_FOUND) + if (err) { - MsgToEventLog(M_SYSERR, L"%S: could not read interface %s v6 name servers (%ld)", - __func__, itf_guid, err); - goto next_itf; + if (err != ERROR_FILE_NOT_FOUND) + { + MsgToEventLog(M_SYSERR, L"%S: could not read interface %s v6 name servers (%ld)", + __func__, itf_guid, err); + } + v6_addrs[0] = '\0'; + v6_addrs_size = 0; } if (v4_addrs_size && v6_addrs_size) {