From: "d12fk (Code Review)" Date: Thu, 26 Jun 2025 10:37:45 +0000 References: Reply-To: heiko@...515..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <2ef8659a2c2e6d3c51653e1993a134c34526a353-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="XBaBL7TKsNE="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: dns: create NRPT registry key if it doesn't exist List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --XBaBL7TKsNE= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1069?usp=3Demail to review the following change. Change subject: dns: create NRPT registry key if it doesn't exist ...................................................................... dns: create NRPT registry key if it doesn't exist Windows 2019 Server by default does not have the key where local system NRPT rules are stored. Tests have determined that NRPT is actually working when rules are created under the key. So, instead of failing if the key doesn't exist, we create it, and things will start working. Change-Id: I46132ebaf3bf3b16798b6f2416f7bf7272f5646b Signed-off-by: Heiko Hund --- M src/openvpnserv/interactive.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/69/1069/1 diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 3bd2722..0a00a6a 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -2662,7 +2662,7 @@ if (err =3D=3D ERROR_FILE_NOT_FOUND) { *gpol =3D FALSE; - err =3D RegOpenKeyExA(HKEY_LOCAL_MACHINE, sys_key, 0, KEY_ALL_ACCE= SS, &nrpt); + err =3D RegCreateKeyExA(HKEY_LOCAL_MACHINE, sys_key, 0, NULL, 0, 0= , NULL, &nrpt, NULL); if (err) { nrpt =3D INVALID_HANDLE_VALUE; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1069?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I46132ebaf3bf3b16798b6f2416f7bf7272f5646b Gerrit-Change-Number: 1069 Gerrit-PatchSet: 1 Gerrit-Owner: d12fk Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-MessageType: newchange --XBaBL7TKsNE= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos.

d12fk would like plaisthos and flichtenheld to review t= his change.

V= iew Change

dns: create NRPT registry key if it doesn't exist
Windows 2019 Server by default does not have the key where local systemNRPT rules are stored. Tests have determined that NRPT is actually
work= ing when rules are created under the key. So, instead of failing if
the = key doesn't exist, we create it, and things will start working.

= Change-Id: I46132ebaf3bf3b16798b6f2416f7bf7272f5646b
Signed-off-by: Heik= o Hund <heiko@...2662...>
---
M src/openvpnserv/interactive.c1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://ge=
rrit.openvpn.net:29418/openvpn refs/changes/69/1069/1
diff --git a/=
src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
index 3bd2722..0a00a6a 100644
--- a/src/openvpnserv/inte= ractive.c
+++ b/src/openvpnserv/interactive.c
@@ -2662,7 +2662,7 @@
if (err =3D=3D ERROR_FILE_NOT= _FOUND)
{
*gpol =3D FALSE;
- err =3D RegOpenK= eyExA(HKEY_LOCAL_MACHINE, sys_key, 0, KEY_ALL_ACCESS, &nrpt);+ err =3D RegCreateKeyE= xA(HKEY_LOCAL_MACHINE, sys_key, 0, NULL, 0, 0, NULL, &nrpt, NULL);
if (err)
{
= nrpt =3D INVALID_HANDLE_VALUE;

=

To view, visit change 1069. To unsubscribe, or for help writing mail filters= , visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I46132ebaf3bf3b16798b6f2416f= 7bf7272f5646b
Gerrit-Change-Number: 1069
Gerrit-PatchSet: 1
Gerrit-Owner: d12fk <heiko@...515...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newchange
--XBaBL7TKsNE=--