From patchwork Mon Nov 2 17:02:38 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 5567 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:3119:b0:118:2077:975e with SMTP id e25csp5697503laa; Mon, 2 Nov 2026 09:02:51 -0800 (PST) X-Forwarded-Encrypted: i=2; AKwUvBwieivFyP9YLvtFSCsHz38oQ/62iDRjjx3ddYwSRfrM/uSfUuaYV37tHcEdJo5Ow/r4NEDpFsX++tg=@openvpn.net X-Received: by 2002:a05:6820:81e:b0:713:da3b:8b37 with SMTP id 006d021491bc7-714f29bb382mr5662703eaf.60.1793638970831; Mon, 02 Nov 2026 09:02:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1793638970; cv=none; d=google.com; s=arc-20260327; b=Dgw1xwmomIFonFm4DYstlmEyHoYMk6ORRlPMXw3ISmMfAaVKKGsl7O7Tupee3TO14/ kNHOz1YnVZIwsm0m7kyLyDYVjV2W+RbQaB1YanBv5Drmo8cUqlQDci68og5D+dYxOtUE HnwpxujBx64/ddj89U1HwLT2c4QErvtfTE/2lIy1q6lL6b+Sr0fI78zhIAd2Ov0qpZXA GXv7pvphwmnJ2KpZwLqZnvu6+H79ANL4fSyY/5c3jngH/k8h2m8rF78VCFOURxnMHYPi lH/1DO3dK3qwiFTIdvIAV2KzBCdS4d7MsAWiQCE9GqfvPHmMWElRrsLfBBM7NTzyqwsh vO0g== 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:dkim-signature; bh=eCDg1nCoyfEW/fA+KeSh/ogff6BZIubB10XYXfuC2kU=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=TsnaEJv3J3vv1wjbU20qTnMet2AJzck3/WUSuE6GaedriTkZ4B4t2/lBXQ1RY6cRm2 rmUp7ivb4gUllBB0jDpt7/uYIspConsg3yl4f+lMADkZ2I6zgZGPKj0m9Uq7F9WflrKg gZJQxXRc3aUfiejqV5xYXqQREt5k+rfvj5rti/bgfeMTueMMR/WoTB1Cdz9e/2WRBExK Y/xSYUwrRsXGVPHVGavXzutZlrCBq03eOfEAYLRCwOhgo2hO8NVy3hsZ8pIE6oCNiQ6z kLhoOC48rIw/cSHVFF734RzBIfAkr24vGkuluZ78lX70wzMqk40bEII+EXYJbGAngOmu gbIg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=P5Xbb8Wp; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=RAzd1J1E; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=FGTqEVTZ; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b="Jzp/WSWE"; 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 006d021491bc7-714f49e1232si12153477eaf.6.2026.11.02.09.02.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Nov 2026 09:02:50 -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=P5Xbb8Wp; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=RAzd1J1E; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=FGTqEVTZ; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b="Jzp/WSWE"; 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 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=eCDg1nCoyfEW/fA+KeSh/ogff6BZIubB10XYXfuC2kU=; b=P5Xbb8WpD6AfNs eP8pknI89MmhhSY+HcBk8ZFinGvhyodomIF2tAk80KYP0kT+/IIe2Nb97veEPIToM4eK4NixnGDCp DJtdobXIB2bh3HInd5WrbSIfbD4sw30yJx4n8CrH2Cn7YFMWs0TTpJ3Yb+9Nml3S/WvuzG3jIU1cJ ns0=; 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 1xNvQn-000000003Mt-3Ohl; Mon, 02 Nov 2026 17:02:49 +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 1xNvQm-000000003Ml-2Ccn for openvpn-devel@lists.sourceforge.net; Mon, 02 Nov 2026 17:02:48 +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: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:List-Id:List-Help:List-Unsubscribe: List-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EQIsNLxooBkj07ui0xSofQRUXcYx652HLugoigo2z9s=; b=RAzd1J1EDwUzeeW1kgJK9ZOsCh BsnUfu9wNEi7C0GdeS1L2vNNq9956VC4+jF+xfyL+4B79tRYWxdDJM5I+Khin4YSQi0S1u1vD49kn fHDlyU7rFomBwHe2JQf/A7CW4EVgKT/WjwvjJWS26NDTjIFhb6aLQt8hLcEoaHgn0XHU=; 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: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:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=EQIsNLxooBkj07ui0xSofQRUXcYx652HLugoigo2z9s=; b=FGTqEVTZ2cJxFm/RBHSPgqHL24 cMq4WzKZRFIe/DKKbJVrlzb/WcSeFBAfZ3G3TGiSfNj9YDWPa8SkEkYFICmhkI+vVwMjOQD+VQC7d bu87+2yKuNv3MVy2fagKhtubX/cxINwguPleXy6OQ7vCkQrpdkrFhcu1qR8uW9pNVzdo=; Received: from mout-p-201.mailbox.org ([80.241.56.171]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xNvQl-0000000060d-3Xxa for openvpn-devel@lists.sourceforge.net; Mon, 02 Nov 2026 17:02:48 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4jJJ0v54HszMlHd for ; Mon, 02 Nov 2026 18:02:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1793638959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EQIsNLxooBkj07ui0xSofQRUXcYx652HLugoigo2z9s=; b=Jzp/WSWEL3PvnWvc+DEgHq7uAT/brM0vzI5EnN8+TyyPHNdFkENco0qolkzl48vSvEratL /+tyAzBItX7IbJIQCvc9CIe8/GAIfKzpKWFVbGu4V0ycfcPxhL611CUDBp3fio42Z/1l14 x6L/OwbSLaaMdtDMKn73ZLM0pgBeknDZmSMbWgKirpVZAX89qAanScUD5Eklm6yKq+aHf1 f1HLhQaF6KNQjnLDL7vWuTb8hXFwm5V0HQwJlLBFvv/ozyxTRcy0d3roHqsRa7wWUS7Xxe lLI5YAlZdCUJgkqiB7hERO65eViVANwwaKVnEpJWV/q4f6jIyGQxqOLpbSM28A== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of frank@lichtenheld.com designates 2001:67c:2050:b231:465::102 as permitted sender) smtp.mailfrom=frank@lichtenheld.com From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Mon, 2 Nov 2026 18:02:38 +0100 Message-ID: <20261102170238.111437-1-frank@lichtenheld.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 4jJJ0v54HszMlHd X-Spam-Score: -0.2 (/) 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: Razvan Cojocaru inet_ntop() returns NULL on failure, but the check treated success as an error, so DHCPv6 DNS servers were never returned. Broken since 0f3b7d17 ("win: implement --dns option support with NRPT"). Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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_EF Message has a valid DKIM or DK signature from envelope-from domain X-Headers-End: 1xNvQl-0000000060d-3Xxa Subject: [Openvpn-devel] [PATCH v2] openvpnserv: fix inverted inet_ntop() check in GetItfDnsServersV6() 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: 1880766777377011046 X-GMAIL-MSGID: 1880766777377011046 From: Razvan Cojocaru inet_ntop() returns NULL on failure, but the check treated success as an error, so DHCPv6 DNS servers were never returned. Broken since 0f3b7d17 ("win: implement --dns option support with NRPT"). Change-Id: I97a14086258c08b47e37f07f103460a9d0bb9afd Signed-off-by: Razvan Cojocaru Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2090 --- 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/+/2090 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index e2f17f0..484f27c 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -2217,7 +2217,7 @@ s--; } - if (inet_ntop(AF_INET6, &in_addrs[i], pos, s) != NULL) + if (inet_ntop(AF_INET6, &in_addrs[i], pos, s) == NULL) { *size = 0; return ERROR_MORE_DATA;