From: "d12fk (Code Review)" Date: Mon, 23 Dec 2024 16:38:14 +0000 In-Reply-To: References: Reply-To: heiko@...515..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., lstipakov@...277... Message-ID: <614f60051dafaf1d6f9346e1b4bd25ec6784d11e-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="LV3vwNdMq5c="; charset=UTF-8 Subject: [Openvpn-devel] [L] Change in openvpn[master]: dns: do not use netsh to set name server addresses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld , stipa Cc: openvpn-devel --LV3vwNdMq5c= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: d12fk, flichtenheld, plaisthos. Hello flichtenheld, plaisthos, stipa, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/825?usp=3Demail to look at the new patch set (#7). The change is no longer submittable: checks~ChecksSubmitRule is unsatisfied= now. Change subject: dns: do not use netsh to set name server addresses ...................................................................... dns: do not use netsh to set name server addresses Instead of spawning a netsh process, set the name server addresses directly in the registry hive of the VPN interface. This is a first step to get rid of the use of command line tools in the service and move to a more API driven style of modifying the VPN adapter configuration. Change-Id: Id2bed0908e84c19b8fb6fe806376316793e550b4 Signed-off-by: Heiko Hund --- M src/openvpnserv/interactive.c 1 file changed, 146 insertions(+), 115 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/25/825/7 diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 0657fab..36ea854 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -1024,65 +1024,6 @@ } /** - * Run the command: netsh interface $proto $action dns $if_name $addr [val= idate=3Dno] - * @param action "delete" or "add" - * @param proto "ipv6" or "ip" - * @param if_name "name_of_interface" - * @param addr IPv4 (for proto =3D ip) or IPv6 address as a string - * - * If addr is null and action =3D "delete" all addresses are deleted. - */ -static DWORD -netsh_dns_cmd(const wchar_t *action, const wchar_t *proto, const wchar_t *= if_name, const wchar_t *addr) -{ - DWORD err =3D 0; - int timeout =3D 30000; /* in msec */ - wchar_t argv0[MAX_PATH]; - wchar_t *cmdline =3D NULL; - - if (!addr) - { - if (wcscmp(action, L"delete") =3D=3D 0) - { - addr =3D L"all"; - } - else /* nothing to do -- return success*/ - { - goto out; - } - } - - /* Path of netsh */ - swprintf(argv0, _countof(argv0), L"%ls\\%ls", get_win_sys_path(), L"ne= tsh.exe"); - - /* cmd template: - * netsh interface $proto $action dns $if_name $addr [validate=3Dno] - */ - const wchar_t *fmt =3D L"netsh interface %ls %ls dns \"%ls\" %ls"; - - /* max cmdline length in wchars -- include room for worst case and som= e */ - size_t ncmdline =3D wcslen(fmt) + wcslen(if_name) + wcslen(addr) + 32 = + 1; - cmdline =3D malloc(ncmdline*sizeof(wchar_t)); - if (!cmdline) - { - err =3D ERROR_OUTOFMEMORY; - goto out; - } - - swprintf(cmdline, ncmdline, fmt, proto, action, if_name, addr); - - if (IsWindows7OrGreater()) - { - wcscat_s(cmdline, ncmdline, L" validate=3Dno"); - } - err =3D ExecCommand(argv0, cmdline, timeout); - -out: - free(cmdline); - return err; -} - -/** * Run the command: netsh interface ip $action wins $if_name [static] $addr * @param action "delete", "add" or "set" * @param if_name "name_of_interface" @@ -1139,22 +1080,6 @@ return err; } -/* Delete all IPv4 or IPv6 dns servers for an interface */ -static DWORD -DeleteDNS(short family, wchar_t *if_name) -{ - wchar_t *proto =3D (family =3D=3D AF_INET6) ? L"ipv6" : L"ip"; - return netsh_dns_cmd(L"delete", proto, if_name, NULL); -} - -/* Add an IPv4 or IPv6 dns server to an interface */ -static DWORD -AddDNS(short family, wchar_t *if_name, wchar_t *addr) -{ - wchar_t *proto =3D (family =3D=3D AF_INET6) ? L"ipv6" : L"ip"; - return netsh_dns_cmd(L"add", proto, if_name, addr); -} - static BOOL CmpWString(LPVOID item, LPVOID str) { @@ -1815,11 +1740,115 @@ return err; } +/** + * Return the interfaces registry key for the specified address family + * + * @param family the internet address family to open the key for + * @param key PHKEY to return the key in + * @return BOOL to indicate success or failure + */ +static BOOL +GetInterfacesKey(short family, PHKEY key) +{ + PCSTR itfs_key =3D family =3D=3D AF_INET6 + ? "SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters\\Interf= aces" + : "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfa= ces"; + + LSTATUS err =3D RegOpenKeyExA(HKEY_LOCAL_MACHINE, itfs_key, 0, KEY_ALL= _ACCESS, key); + if (err) + { + *key =3D INVALID_HANDLE_VALUE; + MsgToEventLog(M_SYSERR, TEXT("GetInterfacesKey: " + "could not open interfaces registry k= ey for family %d (%lu)"), + family, err); + } + + return err ? FALSE : TRUE; +} + +/** + * Set the DNS name servers in a registry interface configuration + * + * @param itf_id the interface id to set the servers for + * @param family internet address family to set the servers for + * @param value the value to set the name servers to + * + * @return DWORD NO_ERROR on success, a Windows error code otherwise + */ +static DWORD +SetNameServersValue(PCWSTR itf_id, short family, PCSTR value) +{ + DWORD err; + + HKEY itfs; + if (!GetInterfacesKey(family, &itfs)) + { + return ERROR_FILE_NOT_FOUND; + } + + HKEY itf =3D INVALID_HANDLE_VALUE; + err =3D RegOpenKeyExW(itfs, itf_id, 0, KEY_ALL_ACCESS, &itf); + if (err) + { + MsgToEventLog(M_SYSERR, TEXT("SetNameServersValue: " + "could not open interface key for %s = family %d (%lu)"), + itf_id, family, err); + goto out; + } + + err =3D RegSetValueExA(itf, "NameServer", 0, REG_SZ, (PBYTE)value, str= len(value) + 1); + if (err) + { + MsgToEventLog(M_SYSERR, TEXT("SetNameServersValue: " + "could not set name servers '%S' for = %s family %d (%lu)"), + value, itf_id, family, err); + } + +out: + if (itf !=3D INVALID_HANDLE_VALUE) + { + RegCloseKey(itf); + } + if (itfs !=3D INVALID_HANDLE_VALUE) + { + RegCloseKey(itfs); + } + return err; +} + +/** + * Set the DNS name servers in a registry interface configuration + * + * @param itf_id the interface id to set the servers for + * @param family internet address family to set the servers for + * @param addrs comma separated list of name server addresses + * + * @return DWORD NO_ERROR on success, a Windows error code otherwise + */ +static DWORD +SetNameServers(PCWSTR itf_id, short family, PCSTR addrs) +{ + return SetNameServersValue(itf_id, family, addrs); +} + +/** + * Delete all DNS name servers from a registry interface configuration + * + * @param itf_id the interface id to clear the servers for + * @param family internet address family to clear the servers for + * + * @return DWORD NO_ERROR on success, a Windows error code otherwise + */ +static DWORD +ResetNameServers(PCWSTR itf_id, short family) +{ + return SetNameServersValue(itf_id, family, ""); +} + static DWORD HandleDNSConfigMessage(const dns_cfg_message_t *msg, undo_lists_t *lists) { DWORD err =3D 0; - wchar_t addr[46]; /* large enough to hold string representation of an = ipv4 / ipv6 address */ undo_type_t undo_type =3D (msg->family =3D=3D AF_INET6) ? undo_dns4 : = undo_dns6; int addr_len =3D msg->addr_len; @@ -1841,10 +1870,11 @@ msgptr->domains[_countof(msg->domains)-1] =3D '\0'; } - wchar_t *wide_name =3D utf8to16(msg->iface.name); /* utf8 to wide-char= */ - if (!wide_name) + WCHAR iid[64]; + err =3D InterfaceIdString(msg->iface.name, iid, _countof(iid)); + if (err) { - return ERROR_OUTOFMEMORY; + return err; } /* We delete all current addresses before adding any @@ -1852,12 +1882,12 @@ */ if (addr_len > 0 || msg->header.type =3D=3D msg_del_dns_cfg) { - err =3D DeleteDNS(msg->family, wide_name); + err =3D ResetNameServers(iid, msg->family); if (err) { - goto out; + return err; } - free(RemoveListItem(&(*lists)[undo_type], CmpWString, wide_name)); + free(RemoveListItem(&(*lists)[undo_type], CmpAny, iid)); } if (msg->header.type =3D=3D msg_del_dns_cfg) @@ -1869,40 +1899,43 @@ err =3D SetDnsSearchDomains(msg->iface.name, NULL, &gpol, list= s); } ApplyDnsSettings(gpol); - goto out; /* job done */ + return err; /* job done */ } - for (int i =3D 0; i < addr_len; ++i) - { - if (msg->family =3D=3D AF_INET6) - { - RtlIpv6AddressToStringW(&msg->addr[i].ipv6, addr); - } - else - { - RtlIpv4AddressToStringW(&msg->addr[i].ipv4, addr); - } - err =3D AddDNS(msg->family, wide_name, addr); - if (i =3D=3D 0 && err) - { - goto out; - } - /* We do not check for duplicate addresses, so any error in adding - * additional addresses is ignored. - */ - } - - err =3D 0; - if (msg->addr_len > 0) { - wchar_t *tmp_name =3D _wcsdup(wide_name); - if (!tmp_name || AddListItem(&(*lists)[undo_type], tmp_name)) + /* prepare the comma separated address list */ + CHAR addrs[256]; /* large enough to hold four IPv4 / IPv6 address = strings */ + size_t offset =3D 0; + for (int i =3D 0; i < addr_len; ++i) { - free(tmp_name); - DeleteDNS(msg->family, wide_name); - err =3D ERROR_OUTOFMEMORY; - goto out; + if (i !=3D 0) + { + addrs[offset++] =3D ','; + } + if (msg->family =3D=3D AF_INET6) + { + RtlIpv6AddressToStringA(&msg->addr[i].ipv6, addrs + offset= ); + } + else + { + RtlIpv4AddressToStringA(&msg->addr[i].ipv4, addrs + offset= ); + } + offset +=3D strlen(addrs); + } + + err =3D SetNameServers(iid, msg->family, addrs); + if (err) + { + return err; + } + + wchar_t *tmp_iid =3D _wcsdup(iid); + if (!tmp_iid || AddListItem(&(*lists)[undo_type], tmp_iid)) + { + free(tmp_iid); + ResetNameServers(iid, msg->family); + return ERROR_OUTOFMEMORY; } } @@ -1913,8 +1946,6 @@ } ApplyDnsSettings(gpol); -out: - free(wide_name); return err; } @@ -2295,11 +2326,11 @@ break; case undo_dns4: - DeleteDNS(AF_INET, item->data); + ResetNameServers(item->data, AF_INET); break; case undo_dns6: - DeleteDNS(AF_INET6, item->data); + ResetNameServers(item->data, AF_INET6); break; case undo_domains: -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/825?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: Id2bed0908e84c19b8fb6fe806376316793e550b4 Gerrit-Change-Number: 825 Gerrit-PatchSet: 7 Gerrit-Owner: d12fk Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-Reviewer: stipa Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Attention: d12fk Gerrit-MessageType: newpatchset --LV3vwNdMq5c= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: d12fk, flichtenheld, plaisthos. <= /p>

d12fk uploaded patch set #7 to this change.

View Change

The change is no longer submittable: checks~ChecksSubmitRule is uns= atisfied now.

dns: do not use netsh to set name server addresses

Ins= tead of spawning a netsh process, set the name server addresses
directly= in the registry hive of the VPN interface.

This is a first step to = get rid of the use of command line tools in the
service and move to a mo= re API driven style of modifying the VPN adapter
configuration.

C= hange-Id: Id2bed0908e84c19b8fb6fe806376316793e550b4
Signed-off-by: Heiko= Hund <heiko@...2662...>
---
M src/openvpnserv/interactive.c1 file changed, 146 insertions(+), 115 deletions(-)

git pull ssh=
://gerrit.openvpn.net:29418/openvpn refs/changes/25/825/7
diff --=
git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c<=
br>index 0657fab..36ea854 100644
--- a/src/openvpnser= v/interactive.c
+++ b/src/openvpnserv/interactive.c<= br>@@ -1024,65 +1024,6 @@
}
=
/**
- * Run = the command: netsh interface $proto $action dns $if_name $addr [validate=3D= no]
- * @param action = "delete" or "add"
- * @param proto "ipv6" or "ip&qu= ot;
- * @param if_name= "name_of_interface"
- * @param addr IPv4 (for proto =3D ip) or IPv6 addres= s as a string
- *
- * If addr is null and acti= on =3D "delete" all addresses are deleted.
- */
-static DWORD
-netsh_dns_cmd(const wchar_t *action, const wchar_t *proto, const wchar= _t *if_name, const wchar_t *addr)
-{
- DWOR= D err =3D 0;
- int t= imeout =3D 30000; /* in msec */
- wchar_t argv0[MAX_PATH];
- wchar_t *cmdline =3D NULL;
-
- if (!addr)
- = {
- if (wcscmp= (action, L"delete") =3D=3D 0)
- {
- addr =3D L"all";
- }
- else /* nothing to do -- return success*/
- {

- goto out;
- }
- }
-<= /span>
- /* Path of netsh *= /
- swprintf(argv0, = _countof(argv0), L"%ls\\%ls", get_win_sys_path(), L"netsh.ex= e");
-
<= span style=3D"color: hsl(0, 100%, 40%);">- /* cmd template:

- * netsh interface $proto $act= ion dns $if_name $addr [validate=3Dno]
- */
-

- /* max cmdline lengt= h in wchars -- include room for worst case and some */
- size_t ncmdline =3D wcslen(fmt) + wcsl= en(if_name) + wcslen(addr) + 32 + 1;
- cmdline =3D malloc(ncmdline*sizeof(wchar_t));
= - if (!cmdline)
- {
- err =3D ERROR_OUTOFMEMORY;
- goto out;
- }
-
- s= wprintf(cmdline, ncmdline, fmt, proto, action, if_name, addr);
-
- if (IsWindows7OrGreater())
- {
- wcscat_s(cmdline, ncmdline, L" validate=3Dno"= ;);
- }
- err =3D ExecCommand(argv0, cmd= line, timeout);
-
-out:
- free(cmdline);
- return err;
-}
-/**
* Run the command: netsh interface ip $action wins $if_name [static] $a= ddr

* @param action "delete", "add&q= uot; or "set"
* @param if_name "name_= of_interface"
@@ -1139,22 +1080,6 @@
= return err;
}

-/* Delete all IPv4 or IPv6 dns servers for = an interface */
-static= DWORD
-DeleteDNS(short= family, wchar_t *if_name)
-{
- wchar_t *pr= oto =3D (family =3D=3D AF_INET6) ? L"ipv6" : L"ip";
- return netsh_dns_cmd(= L"delete", proto, if_name, NULL);
-}
-
-/* Add an IPv4 or I= Pv6 dns server to an interface */
-static DWORD
-{
- wchar_t *proto =3D (family =3D=3D AF_INET6) ? L"ipv= 6" : L"ip";
- return netsh_dns_cmd(L"add", proto, if_name, addr);

-}
-
static BOOL
= CmpWString(LPVOID item, LPVOID str)
{
@@ = -1815,11 +1740,115 @@
return err;
}

+/**=
+ * Return the inter= faces registry key for the specified address family
+ *
+ * @param family the internet address family to open th= e key for
+ * @param = key PHKEY to return the key in
+ * @return BOOL to indicate success or failure
<= span style=3D"color: hsl(120, 100%, 40%);">+ */

+static BOOL
+GetInterfacesKey(short family, PHKEY key)
+{
+ PCSTR itfs_key =3D family =3D=3D AF_INET6
+ ? "SYSTEM\\C= urrentControlSet\\Services\\Tcpip6\\Parameters\\Interfaces"
= + : "SYSTEM\\Curren= tControlSet\\Services\\Tcpip\\Parameters\\Interfaces";
+

+ LSTATUS err =3D RegOpenKeyExA(HKEY_LOCAL_MACHINE, = itfs_key, 0, KEY_ALL_ACCESS, key);
+ if (err)
+ {
+ = *key =3D INVALID_HANDLE_VALUE;
+ MsgToEventLog(M_SYSERR, TEXT("GetInterfacesKey: &= quot;
+ = "could not open interfaces registry key for fam= ily %d (%lu)"),
= + family, err);
+ }
+ return err ?= FALSE : TRUE;
+}

+
+/**
+ * Set the DNS name servers in a registry interface confi= guration
+ *+ * @param itf_id the inte= rface id to set the servers for
+ * @param family internet address family to set the servers = for
+ * @param value = the value to set the name servers to
+ *
+ * @return DWORD NO_ERROR on success, a Windows error code otherwise
+ */
+static DWORD
+SetNameServersValue(PCWSTR itf_id, short fami= ly, PCSTR value)
+{
+ DWORD err;=
+
+ HKEY itfs;
+ if (!GetInterfacesKey(family, &itfs))
+ {
+ return ERROR_FILE_NOT_FOUND;
+ }
+

+ HKEY itf =3D INVALID_HANDLE_VALUE;
+ err =3D RegOpenKeyExW(itfs, itf= _id, 0, KEY_ALL_ACCESS, &itf);

+ if (err)
+ {
+ = MsgToEventLog(M_SYSERR, TEXT("SetNameServersValue: "
= + = "could not open interface key for %s family %d (%lu)"),
+ = itf_id, family, err);
+ goto out;
+= }
+
+ err =3D RegSetValueExA(itf, &= quot;NameServer", 0, REG_SZ, (PBYTE)value, strlen(value) + 1);
<= br>+ if (err)
+ {

+ MsgToEventLog(M_SYSERR, TEXT("SetNa= meServersValue: "
+ value, itf_id, family, err);
+ }
+
+out:
+ if (itf !=3D INVALID_HANDLE_VALUE)
+ {
+ RegCloseKey(itf);
+ }
+ if (itfs !=3D INVALID_HANDLE_VALUE)
+ {
+ RegCloseKey(itfs);
+ }
= + return err;
+}
+
+/**
+ * Set the DNS name servers in a registry interface conf= iguration
+ *<= br>+ * @param itf_id the int= erface id to set the servers for
+ * @param family internet address family to set the servers= for
+ * @param addrs= comma separated list of name server addresses
+ *
+ * @return DWORD NO_ERROR on success, a Windows error code ot= herwise
+ */+static DWORD
+SetNameServers(PCWSTR itf_id, short= family, PCSTR addrs)

+{
+ return SetNa= meServersValue(itf_id, family, addrs);
+}
= +
+/**
+ * Delete all DNS name servers fro= m a registry interface configuration

+ *
+= * @param itf_id the interface id to clear the servers for
+ * @param family internet addr= ess family to clear the servers for

+ *
+ = * @return DWORD NO_ERROR on success, a Windows error code otherwise<= br>+ */
+static DWORD
+ResetNameServers(PCWSTR itf_id, short family)
+{
+ return SetNameServersValue(itf_id, f= amily, "");
+}
+
static DWORD

HandleDNSConfigMessage(const dns_cfg_messag= e_t *msg, undo_lists_t *lists)
{
DWOR= D err =3D 0;
- wchar= _t addr[46]; /* large enough to hold string representation of an ipv4 / ipv= 6 address */
undo_type_t undo_type =3D (msg->family= =3D=3D AF_INET6) ? undo_dns4 : undo_dns6;
int addr_le= n =3D msg->addr_len;

@@ -1841,10 +1870= ,11 @@
msgptr->domains[_countof(msg->domains= )-1] =3D '\0';
}

<= span style=3D"color: hsl(0, 100%, 40%);">- wchar_t *wide_name =3D utf8to= 16(msg->iface.name); /* utf8 to wide-char */
- if (!wide_name)
+ WCHAR iid[64];
+ err =3D InterfaceIdString(msg->iface.name, = iid, _countof(iid));
= + if (err)
{
- return ERROR_OUTOFMEMORY;
+ return err;
}

/* We delete all current addresses befo= re adding any
@@ -1852,12 +1882,12 @@
= */
if (addr_len > 0 || msg->header.type =3D=3D = msg_del_dns_cfg)
{
- err =3D DeleteDNS(msg->family, wide_name);
+ err =3D ResetNa= meServers(iid, msg->family);
if (err) {
- = goto out;
+ = return err;
}
- free(RemoveListItem(&(*lists)[undo_t= ype], CmpWString, wide_name));
+ free(RemoveListItem(&(*lists)[undo_type], CmpAny, ii= d));
}

if (msg-= >header.type =3D=3D msg_del_dns_cfg)
@@ -1869,40 +1899,4= 3 @@
err =3D SetDnsSearchDomains(msg->iface= .name, NULL, &gpol, lists);
}
= ApplyDnsSettings(gpol);
- goto out; /* job done */
+ return err; /* job done */
}


- for (int i =3D 0; i < addr_len; ++i)
- {
- if (msg->family =3D=3D AF_INET6)
- {
- RtlIpv6AddressToStringW(&msg->addr[= i].ipv6, addr);
- = }
- else
- {
- RtlIpv4AddressToStringW(&am= p;msg->addr[i].ipv4, addr);
- }
- = err =3D AddDNS(msg->family, wide_name, addr);
- if (i =3D=3D 0 && err)
- {
- goto out;
- }
- /* We do not check for duplicate addresses= , so any error in adding
- */
- }
-<= /span>
- err =3D 0;<= br>-
if (msg= ->addr_len > 0)
{
- wchar_t *tmp_name =3D _wcsdup(wide_name);
- if (!tmp_name ||= AddListItem(&(*lists)[undo_type], tmp_name))
+ /* prepare the comma separated addres= s list */
+ CH= AR addrs[256]; /* large enough to hold four IPv4 / IPv6 address strings */<= /span>
+ size_t offse= t =3D 0;
+ for= (int i =3D 0; i < addr_len; ++i)
{
<= span style=3D"color: hsl(0, 100%, 40%);">- free(tmp_name);
- DeleteDNS(msg-&= gt;family, wide_name);
= - err =3D ERROR_OUTOFMEMORY;
- goto out;
+ if (i !=3D 0)
+ {
+ addrs[offset++] =3D ',';=
+ }
+ if (msg->family = =3D=3D AF_INET6)

+ = {
+ = RtlIpv6AddressToStringA(&msg->addr[i].ipv6, addrs + offset);<= /span>
+ }=
+ else+ {
+ RtlIpv4AddressToStr= ingA(&msg->addr[i].ipv4, addrs + offset);

+ }
+ offset +=3D strlen(addrs);
+ }

+
+ err =3D SetNameServers(iid, msg->family, addrs);<= /span>
+ if (err)
+ {
+ return err;
+ }
+
+ wchar_t *tmp_iid =3D _wcsdup(iid);
+ if (!tmp_iid || AddListItem= (&(*lists)[undo_type], tmp_iid))

+ {
+ free(tmp_iid);
+ ResetNameServers(iid, msg->family);
= + return ERROR_OUTOF= MEMORY;
}
}
=
@@ -1913,8 +1946,6 @@
}
ApplyDnsSettings(gpol);


-out:
- free(wide_name);
return err;
= }

@@ -2295,11 +2326,11 @@ break;

= case undo_dns4:
- DeleteDNS(AF_INET, item->data);
+ ResetNameServe= rs(item->data, AF_INET);

break;

case undo_dns6:
<= span style=3D"color: hsl(0, 100%, 40%);">- DeleteDNS(AF_= INET6, item->data);

cha= nge 825
. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id2bed0908e84c19b8fb6fe80637= 6316793e550b4
Gerrit-Change-Number: 825
Gerrit-PatchSet: 7
Gerrit-Owner: d12fk <heiko@...515...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-Reviewer: stipa <lstipakov@...277...= >
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: d12fk <heiko@...515...>= ;
Gerrit-MessageType: newpatchset
--LV3vwNdMq5c=--