From: "cron2 (Code Review)" Date: Fri, 11 Aug 2023 14:44:22 +0000 In-Reply-To: References: Reply-To: arne-openvpn@...1227..., selva.nair@...277..., openvpn-devel@lists.sourceforge.net, frank@...2641..., lstipakov@...277..., a@...2181... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="G8wR8GNkRk4="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[release/2.6]: Set WINS servers via interactice service List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: stipa , plaisthos , flichtenheld , selvanair Cc: openvpn-devel --G8wR8GNkRk4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#4) to the change originally created by= stipa. ( http://gerrit.openvpn.net/c/openvpn/+/321?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by flichtenheld Change subject: Set WINS servers via interactice service ...................................................................... Set WINS servers via interactice service At the moments WINS servers are set either: - via DHCP, which works only for tap-windows6 driver - via netsh when running without interactice service This means that in 2.6 default setup (interactive service and dco) WINS is silently ignored. Add WINS support for non-DHCP drivers (like dco) by passing WINS settings to interactive service and set them there with netsh call, similar approach as we use for setting DNS. Fixes https://github.com/OpenVPN/openvpn/issues/373 Change-Id: I47c22dcb728011dcedaae47cd03a57219e9c7607 Signed-off-by: Lev Stipakov Acked-by: Frank Lichtenheld Message-Id: <20230728131246.694-1-lstipakov@...277...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26= 903.html Signed-off-by: Gert Doering (cherry picked from commit 18826de5737789cb74b48fc40a9ff5cb37d38d98) --- M include/openvpn-msg.h M src/openvpn/tun.c M src/openvpnserv/interactive.c 3 files changed, 226 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/21/321/4 diff --git a/include/openvpn-msg.h b/include/openvpn-msg.h index 8cd2631..a1464cd 100644 --- a/include/openvpn-msg.h +++ b/include/openvpn-msg.h @@ -40,7 +40,9 @@ msg_register_dns, msg_enable_dhcp, msg_register_ring_buffers, - msg_set_mtu + msg_set_mtu, + msg_add_wins_cfg, + msg_del_wins_cfg } message_type_t; typedef struct { @@ -89,6 +91,13 @@ typedef struct { message_header_t header; interface_t iface; + int addr_len; + inet_address_t addr[4]; /* support up to 4 dns addresses */ +} wins_cfg_message_t; + +typedef struct { + message_header_t header; + interface_t iface; int disable_nbt; int nbt_type; char scope_id[256]; diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index af959bb..1f2539d 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -282,6 +282,72 @@ } static bool +do_wins_service(bool add, const struct tuntap *tt) +{ + bool ret =3D false; + ack_message_t ack; + struct gc_arena gc =3D gc_new(); + HANDLE pipe =3D tt->options.msg_channel; + int len =3D tt->options.wins_len; + int addr_len =3D add ? len : 0; + + if (addr_len =3D=3D 0 && add) /* no addresses to add */ + { + return true; + } + + wins_cfg_message_t wins =3D { + .header =3D { + (add ? msg_add_wins_cfg : msg_del_wins_cfg), + sizeof(wins_cfg_message_t), + 0 + }, + .iface =3D {.index =3D tt->adapter_index, .name =3D "" }, + .addr_len =3D addr_len + }; + + /* interface name is required */ + strncpy(wins.iface.name, tt->actual_name, sizeof(wins.iface.name)); + wins.iface.name[sizeof(wins.iface.name) - 1] =3D '\0'; + + if (addr_len > _countof(wins.addr)) + { + addr_len =3D _countof(wins.addr); + wins.addr_len =3D addr_len; + msg(M_WARN, "Number of WINS addresses sent to service truncated to= %d", + addr_len); + } + + for (int i =3D 0; i < addr_len; ++i) + { + wins.addr[i].ipv4.s_addr =3D htonl(tt->options.wins[i]); + } + + msg(D_LOW, "%s WINS servers on '%s' (if_index =3D %d) using service", + (add ? "Setting" : "Deleting"), wins.iface.name, wins.iface.index); + + if (!send_msg_iservice(pipe, &wins, sizeof(wins), &ack, "TUN")) + { + goto out; + } + + if (ack.error_number !=3D NO_ERROR) + { + msg(M_WARN, "TUN: %s WINS failed using service: %s [status=3D%u if= _name=3D%s]", + (add ? "adding" : "deleting"), strerror_win32(ack.error_number= , &gc), + ack.error_number, wins.iface.name); + goto out; + } + + msg(M_INFO, "WINS servers %s using service", (add ? "set" : "deleted")= ); + ret =3D true; + +out: + gc_free(&gc); + return ret; +} + +static bool do_set_mtu_service(const struct tuntap *tt, const short family, const int = mtu) { bool ret =3D false; @@ -1557,6 +1623,7 @@ do_address_service(true, AF_INET, tt); do_dns_service(true, AF_INET, tt); do_dns_domain_service(true, tt); + do_wins_service(true, tt); } else { @@ -6979,6 +7046,7 @@ } else if (tt->options.msg_channel) { + do_wins_service(false, tt); do_dns_domain_service(false, tt); do_dns_service(false, AF_INET, tt); do_address_service(false, AF_INET, tt); diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index d73cef0..a47db8a 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -93,6 +93,7 @@ undo_dns6, undo_domain, undo_ring_buffer, + undo_wins, _undo_type_max } undo_type_t; typedef list_item_t *undo_lists_t[_undo_type_max]; @@ -1084,6 +1085,63 @@ } /** + * Run the command: netsh interface ip $action wins $if_name [static] $addr + * @param action "delete", "add" or "set" + * @param if_name "name_of_interface" + * @param addr IPv4 address as a string + * + * If addr is null and action =3D "delete" all addresses are deleted. + * if action =3D "set" then "static" is added before $addr + */ +static DWORD +netsh_wins_cmd(const wchar_t *action, 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; + const wchar_t *addr_static =3D (wcscmp(action, L"set") =3D=3D 0) ? L"s= tatic" : L""; + + 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 */ + openvpn_swprintf(argv0, _countof(argv0), L"%ls\\%ls", get_win_sys_path= (), L"netsh.exe"); + + /* cmd template: + * netsh interface ip $action wins $if_name $static $addr + */ + const wchar_t *fmt =3D L"netsh interface ip %ls wins \"%ls\" %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(action) + w= cslen(addr) + +wcslen(addr_static) + 32 + 1; + cmdline =3D malloc(ncmdline * sizeof(wchar_t)); + if (!cmdline) + { + err =3D ERROR_OUTOFMEMORY; + goto out; + } + + openvpn_swprintf(cmdline, ncmdline, fmt, action, if_name, addr_static,= addr); + + err =3D ExecCommand(argv0, cmdline, timeout); + +out: + free(cmdline); + return err; +} + +/** * Run command: wmic nicconfig (InterfaceIndex=3D$if_index) call $action (= $data) * @param if_index "index of interface" * @param action e.g., "SetDNSDomain" @@ -1299,6 +1357,86 @@ } static DWORD +HandleWINSConfigMessage(const wins_cfg_message_t *msg, undo_lists_t *lists) +{ + DWORD err =3D 0; + wchar_t addr[16]; /* large enough to hold string representation of an = ipv4 */ + int addr_len =3D msg->addr_len; + + /* sanity check */ + if (addr_len > _countof(msg->addr)) + { + addr_len =3D _countof(msg->addr); + } + + if (!msg->iface.name[0]) /* interface name is required */ + { + return ERROR_MESSAGE_DATA; + } + + /* use a non-const reference with limited scope to enforce null-termin= ation of strings from client */ + { + wins_cfg_message_t *msgptr =3D (wins_cfg_message_t *)msg; + msgptr->iface.name[_countof(msg->iface.name) - 1] =3D '\0'; + } + + wchar_t *wide_name =3D utf8to16(msg->iface.name); /* utf8 to wide-char= */ + if (!wide_name) + { + return ERROR_OUTOFMEMORY; + } + + /* We delete all current addresses before adding any + * OR if the message type is del_wins_cfg + */ + if (addr_len > 0 || msg->header.type =3D=3D msg_del_wins_cfg) + { + err =3D netsh_wins_cmd(L"delete", wide_name, NULL); + if (err) + { + goto out; + } + free(RemoveListItem(&(*lists)[undo_wins], CmpWString, wide_name)); + } + + if (msg->header.type =3D=3D msg_del_wins_cfg) + { + goto out; /* job done */ + } + + for (int i =3D 0; i < addr_len; ++i) + { + RtlIpv4AddressToStringW(&msg->addr[i].ipv4, addr); + err =3D netsh_wins_cmd(i =3D=3D 0 ? L"set" : L"add", wide_name, ad= dr); + 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 (addr_len > 0) + { + wchar_t *tmp_name =3D _wcsdup(wide_name); + if (!tmp_name || AddListItem(&(*lists)[undo_wins], tmp_name)) + { + free(tmp_name); + netsh_wins_cmd(L"delete", wide_name, NULL); + err =3D ERROR_OUTOFMEMORY; + goto out; + } + } + +out: + free(wide_name); + return err; +} + +static DWORD HandleEnableDHCPMessage(const enable_dhcp_message_t *dhcp) { DWORD err =3D 0; @@ -1487,6 +1625,7 @@ enable_dhcp_message_t dhcp; register_ring_buffers_message_t rrb; set_mtu_message_t mtu; + wins_cfg_message_t wins; } msg; ack_message_t ack =3D { .header =3D { @@ -1547,6 +1686,11 @@ ack.error_number =3D HandleDNSConfigMessage(&msg.dns, lists); break; + case msg_add_wins_cfg: + case msg_del_wins_cfg: + ack.error_number =3D HandleWINSConfigMessage(&msg.wins, lists); + break; + case msg_enable_dhcp: if (msg.header.size =3D=3D sizeof(msg.dhcp)) { @@ -1608,6 +1752,10 @@ DeleteDNS(AF_INET6, item->data); break; + case undo_wins: + netsh_wins_cmd(L"delete", item->data, NULL); + break; + case undo_domain: SetDNSDomain(item->data, "", NULL); break; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/321?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: I47c22dcb728011dcedaae47cd03a57219e9c7607 Gerrit-Change-Number: 321 Gerrit-PatchSet: 4 Gerrit-Owner: stipa Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: ordex Gerrit-Reviewer: plaisthos Gerrit-Reviewer: selvanair Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --G8wR8GNkRk4= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #4 to the change originally cr= eated by stipa.

View Change

The following approvals got outdated and= were removed: Code-Review+2 by flichtenheld

Set WINS servers via interactice service
<= br>At the moments WINS servers are set either:

- via DHCP, which wo= rks only for tap-windows6 driver
- via netsh when running without inter= actice service

This means that in 2.6 default setup (interactive ser= vice and dco)
WINS is silently ignored.

Add WINS support for non-= DHCP drivers (like dco) by passing
WINS settings to interactive service = and set them there with
netsh call, similar approach as we use for setti= ng DNS.

Fixes https://github.com/OpenVPN/openvpn/issues/373

C= hange-Id: I47c22dcb728011dcedaae47cd03a57219e9c7607
Signed-off-by: Lev S= tipakov <lev@...515...>
Acked-by: Frank Lichtenheld <frank@...1665...= 641...>
Message-Id: <20230728131246.694-1-lstipakov@...277...><= br>URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/ms= g26903.html
Signed-off-by: Gert Doering <gert@...1296...>
(cher= ry picked from commit 18826de5737789cb74b48fc40a9ff5cb37d38d98)
---
M= include/openvpn-msg.h
M src/openvpn/tun.c
M src/openvpnserv/interact= ive.c
3 files changed, 226 insertions(+), 1 deletion(-)

git pu= ll ssh://gerrit.openvpn.net:29418/openvpn refs/changes/21/321/4
dif=
f --git a/include/openvpn-msg.h b/include/openvpn-msg.h
ind= ex 8cd2631..a1464cd 100644
--- a/include/openvpn-msg.h
+++ b/include/openvpn-msg.h
@@ -40,7 +40,9 @@
msg_register_dns,
msg_enable_dhcp,=
msg_register_ring_buffers,
- msg_set_mtu
+ msg_set_mtu,
+ msg_add_wins_cfg,
+ msg_del_wins_cfg
} message_type_= t;

typedef struct {
@@ -= 89,6 +91,13 @@
typedef struct {
messa= ge_header_t header;
interface_t iface;
+ int addr_len;

+ inet_address_t addr[4]; /* suppor= t up to 4 dns addresses */
+} wins_cfg_message_t;
+
+typedef st= ruct {
+ message_h= eader_t header;
+ = interface_t iface;
int disable_nbt;
= int nbt_type;
char scope_id[256];
d= iff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index af9= 59bb..1f2539d 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c

@@ -282,6 +282,72 @@
}

static bool
+do_wins_service(bool add, const struct tu= ntap *tt)
+{+ bool ret =3D false;
+ ack_message_t ack;
+ struct gc_arena g= c =3D gc_new();
+ = HANDLE pipe =3D tt->options.msg_channel;
+ int len =3D tt->options.wins_len;
= + int addr_len =3D add ? len= : 0;
+
+ if (addr_len =3D=3D 0 &&a= mp; add) /* no addresses to add */

+ {
= + return true;
+ }
+
<= span style=3D"color: hsl(120, 100%, 40%);">+ wins_cfg_message_t wins =3D= {

+ .header = =3D {
+ (a= dd ? msg_add_wins_cfg : msg_del_wins_cfg),
+ sizeof(wins_cfg_message_t),
+ 0
+ },
+ .iface =3D {.index =3D tt->adapter_i= ndex, .name =3D "" },
+ .addr_len =3D addr_len
+ };
+
+ /* in= terface name is required */
+ strncpy(wins.iface.name, tt->actual_name, sizeof(wins.iface.= name));
+ wins.ifa= ce.name[sizeof(wins.iface.name) - 1] =3D '\0';
+
+ if (addr_len > _countof(wins.addr))
+ {
+ addr_len =3D _countof(wins.addr);+ wins.addr_len =3D ad= dr_len;
+ msg(= M_WARN, "Number of WINS addresses sent to service truncated to %d"= ;,
+ addr_= len);
+ }+
+ for (int i =3D 0; i < addr_len; ++i)
+ {
+ wins.addr[i].ipv4.s_addr =3D = htonl(tt->options.wins[i]);
+ }
+

+ msg(D_LOW, "%= s WINS servers on '%s' (if_index =3D %d) using service",
+ (add ? "Sett= ing" : "Deleting"), wins.iface.name, wins.iface.index);
+
+ if (!send_msg_iservice(pipe, &win= s, sizeof(wins), &ack, "TUN"))
+ {
+ goto out;
+ }
+
+ if (ack.error_number= !=3D NO_ERROR)
+ = {
+ msg(M_WARN= , "TUN: %s WINS failed using service: %s [status=3D%u if_name=3D%s]&qu= ot;,
+ (ad= d ? "adding" : "deleting"), strerror_win32(ack.error_nu= mber, &gc),
+ = ack.error_number, wins.iface.name);
+ goto out;
+ }
+
+ msg(M_I= NFO, "WINS servers %s using service", (add ? "set" : &q= uot;deleted"));
= + ret =3D true;
+<= /span>
+out:
+ gc_free(&gc);

+ return ret;

+}
+
= +static bool
do_set_mtu_service(const struct tuntap *tt, c= onst short family, const int mtu)
{
b= ool ret =3D false;
@@ -1557,6 +1623,7 @@
= do_address_service(true, AF_INET, tt);
do_d= ns_service(true, AF_INET, tt);
do_dns_domain_servi= ce(true, tt);
+ = do_wins_service(true, tt);
}
el= se
{
@@ -6979,6 +7046,7 @@
<= span> }

else if (tt->options.msg_channe= l)
{
+ do_wins_service(false, tt);
= do_dns_domain_service(false, tt);
do_dns_s= ervice(false, AF_INET, tt);
do_address_service= (false, AF_INET, tt);
diff --git a/src/openvpnserv/interact= ive.c b/src/openvpnserv/interactive.c
index d73cef0..a47db8= a 100644
--- a/src/openvpnserv/interactive.c
+++ b/src/openvpnserv/interactive.c

@@ -93,6 +93,7 @@
undo_dns6,
undo_domain,
undo_ring_buffer,

+ undo_wins,
_undo_type_max
= } undo_type_t;
typedef list_item_t *undo_lists_t[_undo_typ= e_max];
@@ -1084,6 +1085,63 @@
}
/**
+ * Run the command: netsh interface ip $action wins $if_name [sta= tic] $addr
+ * @param= action "delete", "add" or "set"=
+ * @param if_name &qu= ot;name_of_interface"
+ * @param addr IPv4 address as a string
+ *
+ * If addr is null and action =3D "delete" all = addresses are deleted.
+ */+static DWORD
+netsh_wins_cmd(const wchar_t *action= , 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;
+ const wchar_t *addr_= static =3D (wcscmp(action, L"set") =3D=3D 0) ? L"static"= ; : L"";
+<= /span>
+ if (!addr)

+ {
+ if (wcscmp(action, L"delet= e") =3D=3D 0)
+ = {
+ = addr =3D L"all";
+ }
+ = else /* nothing to do -- return success*/
+ {
+ goto out;
+ }
+ }
+
+ /* Path of netsh */=
+ openvpn_swprint= f(argv0, _countof(argv0), L"%ls\\%ls", get_win_sys_path(), L"= ;netsh.exe");
+<= /span>
+ /* cmd template:=
+ * netsh interf= ace ip $action wins $if_name $static $addr
+ */
+ const wchar_t *fmt =3D L"netsh interface ip %ls wins \&= quot;%ls\" %ls %ls";
+
+ /* m= ax cmdline length in wchars -- include room for worst case and some */
+ size_t ncmdline =3D = wcslen(fmt) + wcslen(if_name) + wcslen(action) + wcslen(addr)
+ +wcslen(add= r_static) + 32 + 1;

+= cmdline =3D malloc(ncmdline * sizeof(wchar_t));
+ if (!cmdline)
+ {
+ err =3D ERROR_OUTOFMEMORY;
+ goto out;
+ }
+
= + openvpn_swprintf(cmdline, ncmdline, fmt, action, if_name, addr_static,= addr);
+
<= span style=3D"color: hsl(120, 100%, 40%);">+ err =3D ExecCommand(argv0, = cmdline, timeout);

+<= /span>
+out:
+ free(cmdline);

+ return err;
+}
+
+/*= *
* Run command: wmic nicconfig (InterfaceIndex=3D$if_ind= ex) call $action ($data)
* @param if_index "inde= x of interface"
* @param action e.g., "Se= tDNSDomain"
@@ -1299,6 +1357,86 @@
}<= /span>

static DWORD
+HandleWINSConfigMessage(const wins_cfg_message_= t *msg, undo_lists_t *lists)
+{
+ DWORD= err =3D 0;
+ wcha= r_t addr[16]; /* large enough to hold string representation of an ipv4 */
+ int addr_len =3D = msg->addr_len;
+
+ /* sanity check *= /
+ if (addr_len &= gt; _countof(msg->addr))
+ {
+ = addr_len =3D _countof(msg->addr);
+ }
+
+ if (!msg-&= gt;iface.name[0]) /* interface name is required */
+ {
+ return ERROR_MESSAGE_DATA;
+ }
+
= + /* use a non-const reference with limited scope to enforce null-termin= ation of strings from client */
+ {
+ = wins_cfg_message_t *msgptr =3D (wins_cfg_message_t *)msg;
<= span style=3D"color: hsl(120, 100%, 40%);">+ msgptr->iface.name[_= countof(msg->iface.name) - 1] =3D '\0';

+ }
+
+ = wchar_t *wide_name =3D utf8to16(msg->iface.name); /* utf8 to wide-char= */
+ if (!wide_na= me)
+ {
= + return ERROR_OUTOFMEMO= RY;
+ }
= +
+ /* We delete all current addresses before add= ing any
+ * OR if= the message type is del_wins_cfg
+ */
+ if (addr_len > 0 || msg->header.type =3D=3D msg_del_wins_cfg)
+ {
+ err =3D netsh_wins_cmd(L&qu= ot;delete", wide_name, NULL);

+ if (err)
+ {
+ goto out;
+ }
+ = free(RemoveListItem(&(*lists)[undo_wins], CmpWString, wide_name));

+ }
+
+ if (msg->header.type =3D=3D msg_del_wins_cfg)
+ {
+ goto out; /* job done */
+ }
+
+ for (int i =3D 0; i < addr_len; ++i)
<= span style=3D"color: hsl(120, 100%, 40%);">+ {

+ RtlIpv4AddressToStringW(&msg->= addr[i].ipv4, addr);
= + err =3D netsh_wins_cmd(i =3D=3D 0 ? L"set" : L"add&= quot;, wide_name, addr);
+ if (i =3D=3D 0 && err)
+ {
+ goto out;
+ }
+ /* We do not check for duplicate addresses, so any error in a= dding
+ * add= itional addresses is ignored.
+ */
+ }
+
<= span style=3D"color: hsl(120, 100%, 40%);">+ err =3D 0;

+
+ if (addr_len > 0)
+ {
+ wchar_t *tmp_name =3D _wcsdup(wide_name);
+ if (!tmp_name || AddListIt= em(&(*lists)[undo_wins], tmp_name))
+ {
+ free(tmp_name);
+ netsh_wins_cmd(L"delete", wide_name= , NULL);
+ = err =3D ERROR_OUTOFMEMORY;
+ goto out;
+ }
+= }
+
+out:
+ free(wide_name);
+ return err;
+}
+
+static DWORD<= /span>
HandleEnableDHCPMessage(const enable_dhcp_message_t *dhcp)=
{
DWORD err =3D 0;
@= @ -1487,6 +1625,7 @@
enable_dhcp_message_t dhcp;
register_ring_buffers_message_t rrb;
set_mtu_message_t mtu;

+ wins_cfg_message_t wins;
} msg;<= /span>
ack_message_t ack =3D {
.head= er =3D {
@@ -1547,6 +1686,11 @@
= ack.error_number =3D HandleDNSConfigMessage(&msg.dns, lists);<= br> break;

+ case msg_add_wins_cfg:
+ case msg_del_wins_cfg:=
+ ack.error_numb= er =3D HandleWINSConfigMessage(&msg.wins, lists);
+ break;
+
case msg_enable= _dhcp:
if (msg.header.size =3D=3D sizeof(msg.d= hcp))
{
@@ -1608,6 +1752,10 @@=
DeleteDNS(AF_INET6, item->data);
break;

+ case undo_wins:
+ ne= tsh_wins_cmd(L"delete", item->data, NULL);
+ break;
+

= case undo_domain:
SetDNSDomain(item-= >data, "", NULL);
break;<= /span>

To view, visit change 321. To unsubscribe, o= r for help writing mail filters, visit settings.

=
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: I47c22dcb728011dcedaae47cd03= a57219e9c7607
Gerrit-Change-Number: 321
Gerrit-PatchSet: 4
Gerrit-Owner: stipa <lstipakov@...277...>= ;
Gerrit-Reviewer: cron2
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: ordex <a@...2181...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-Reviewer: selvanair <selva.nair@...1665...= 77...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--G8wR8GNkRk4=--