From patchwork Fri Aug 11 14:44:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "cron2 (Code Review)" X-Patchwork-Id: 3316 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:ed0c:b0:d7:3b0f:3938 with SMTP id oy12csp1439437dyb; Fri, 11 Aug 2023 07:45:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGiKjOjNaqwzJ8o6pcgStSb+yBIhX2zLXlyOhbSaudCC7bpD7TiCZaYmO/8bOVLJuAG80p8 X-Received: by 2002:a17:902:c789:b0:1bc:16cf:fc30 with SMTP id w9-20020a170902c78900b001bc16cffc30mr1992402pla.63.1691765102268; Fri, 11 Aug 2023 07:45:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691765102; cv=none; d=google.com; s=arc-20160816; b=TV6VieWamoz6Nga7gdxb6veShOCeUxDbRaD+bpEduhUhilzbLGekQG3Nv2cwV6Orb2 766vNBOzDBx5+UmptO6yWlFsvVJhaokfTqrZ5nr0Ecz4F5kKw20vQRVoRn87rCaU8V4u oWWm/YHiSwtB7yy6dJ0XSkGIFD24RvmSjqlSjomxOED2tKfeM4Y+9wwAgmlfz53m1EWU x6madJNlpPGZNFwcrsF7+xCK62yqcc528Z5tPs3xcTBqHkupcMh6b8QvoxDLmcDNJBkJ zhxOm0BzF/684Rqku+cImKOWvTqdV1JK5+WupQQfsi985g6S7x8QwEfalAyqaIzAj2IL 9OZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:in-reply-to:auto-submitted:to :date:from:dkim-signature:dkim-signature:dkim-signature; bh=cKhFvEfW01yfAwQK+7HtWiancMBdTkGFwpn+KjkVXSs=; fh=1SerdvxJiSfihhA7kW+M8d0SF0Eq4ta4E6dEMWR1sSo=; b=Mxgl4KrTS9eAZ1n+oUNq34Ssp2+jFmcJOhYx7lZ3MYbm8W86H1K/nv1ancV5tiSWMB vkGvQoo2eQ8JUc8BjYGJO412Fcvob5AsVQu4jtdZ5XgIZrDp8wHf4w/5UyI07IkgICFZ UylWOUtpUnUQFui+abED5VgREiNNuvvOrXTeXnXyAYL4vOU6BXaF5j9Kjd6d7crr8W/r Top/0lhEIQYbtpa5gmKnpL/zEPqjVHmN7OsDyQiLADrn7A0O7soGD1NJf+GvH3RXoGwj oYhwN1qfxtI+/bn6D5xIGjf704YGJBPTfDJtHGArmHuw8Qe/gj9Sf50n2q90Yqs6Ia1s VWOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=f8Jfzugc; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=UhZMAQzF; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=fpCS0qcf; 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=openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id m17-20020a170902f21100b001bbac6722e6si3348296plc.371.2023.08.11.07.45.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Aug 2023 07:45:02 -0700 (PDT) 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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=f8Jfzugc; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=UhZMAQzF; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=fpCS0qcf; 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=openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qUTNW-0002ti-UT; Fri, 11 Aug 2023 14:44:39 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qUTNW-0002tc-2j for openvpn-devel@lists.sourceforge.net; Fri, 11 Aug 2023 14:44:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:In-Reply-To:Subject:List-Unsubscribe:List-Id: Cc:To:Date:From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Help:List-Subscribe :List-Post:List-Owner:List-Archive; bh=lg+HanNerwbptW6rhT6pjsLpOL6Z9COoBeHX2jR1DxY=; b=f8Jfzugcg11MoB3IokvtoHHjex EqdrvtcReMwv/FWH4mX8Bdq/zEjhDYgOzwiuXqEBNDgRx5LEdCJuoCk7NpirK9qqoaoV0JzLlxq1z PjmbuzTBb6D/4DTCVsLkwzo7Q7nljuEeLeQw2/P4WQF22VmKZ5fWrrqQwJ7pmPBX4a8k=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:In-Reply-To:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From: Sender:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=lg+HanNerwbptW6rhT6pjsLpOL6Z9COoBeHX2jR1DxY=; b=U hZMAQzFKJUIMUGHqSi4+fUEc0oBN3OEdY9aczd8eexSbg48RtIML0LvW05EiNdVw3EIB1EJpYLNno n/6lp5NOIxb6DhAFwhsDo/HfvEMSX8WSLzI/GpxLo7hcTB01zJxe+7UmQLwm2hiU8dzgJYUdaQNPa nS/MhAJ+YJuRMMp8=; Received: from mail-wm1-f44.google.com ([209.85.128.44]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1qUTNR-00009E-7F for openvpn-devel@lists.sourceforge.net; Fri, 11 Aug 2023 14:44:36 +0000 Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-3fe8a1591c8so4459865e9.3 for ; Fri, 11 Aug 2023 07:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1691765066; x=1692369866; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:in-reply-to:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=lg+HanNerwbptW6rhT6pjsLpOL6Z9COoBeHX2jR1DxY=; b=fpCS0qcfrpyOt6wkXYly41iAJ6ALfA9R0cOFKtaydDkN7OQ/i4RhZUDYZVrcndx3yP eoBDCJVVcgPN64SXH9xibNJCgoKwzSO4GCkdoGkGu/GsUNVLoYqdkU8pt05HfhhBtVzF v8kFf+1hEGuSq3FFWnTzqfuvs2/esFVmpMRtQJGZq4N0OkZgs8tq4PCkrduJhvpkdp3G Yp+QwJHdnEZ+/M9ptXD7u9UivETK2rC6kvkvNqkj/4GRJ3JMxq9FA6BZrTjtp+ZnqPsS Qo+kcLZ0kqoSRIoEUQl69Z967z8cW08RqnyX2NucpVXvIkML6Q0xXgHQacXF4zGPtpyQ F9Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691765066; x=1692369866; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:in-reply-to:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lg+HanNerwbptW6rhT6pjsLpOL6Z9COoBeHX2jR1DxY=; b=UAFhY9z2t/3Ckbn8e2MhWpfg1kWANZZt3xSbK6fOOwUvYHaziDje3ERxaGlI/jGbVk PNjFtD5kTFPZy6jd43n4IVHjGFl5HFQ8qKF1Ejj3wtwLzXTurGrCeMv3iJReCE0JjUqQ mrLq9qwCe/a8ignQzVWmNdH1DCsVzIOUkzMzck9E9jRVdYohH5+HCp+QzRhrLxCxGyqx +O3FN+EjR1mHiqMD0RBG1+FOcCF/9RUHBC6wzzX9ywNg4jcv9diY0JP4+t3571fe8Fer IefHyeV39qH86YLcsbolNPjonD81mRiWTwtxj3bHS8n7X0uH1d0kRY6vJul/rdjcG0Ra P5Sw== X-Gm-Message-State: AOJu0Yz02+q3X7TA822NgCMC9l0iYPXX9j0xJgT/ed9OMZREGlU+YQL6 PB7dRytMapiXAwMp3S9l4WCWqQ== X-Received: by 2002:adf:f281:0:b0:317:6a07:83a7 with SMTP id k1-20020adff281000000b003176a0783a7mr1361786wro.38.1691765066635; Fri, 11 Aug 2023 07:44:26 -0700 (PDT) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id n12-20020a5d420c000000b0031274a184d5sm5649273wrq.109.2023.08.11.07.44.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Aug 2023 07:44:26 -0700 (PDT) From: "cron2 (Code Review)" X-Google-Original-From: "cron2 (Code Review)" X-Gerrit-PatchSet: 4 Date: Fri, 11 Aug 2023 14:44:25 +0000 To: stipa Auto-Submitted: auto-generated X-Gerrit-MessageType: merged X-Gerrit-Change-Id: I47c22dcb728011dcedaae47cd03a57219e9c7607 X-Gerrit-Change-Number: 321 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: 64a75e75b8929f1290ba984f60d0c13447a41407 In-Reply-To: References: Message-ID: MIME-Version: 1.0 User-Agent: Gerrit/3.8.0 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", 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: cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/321?usp=email ) Change subject: Set WINS servers via interactice service Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.44 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.44 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1qUTNR-00009E-7F Subject: [Openvpn-devel] [M] Change in openvpn[release/2.6]: Set WINS servers via interactice service 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: , Reply-To: arne-openvpn@rfc2549.org, selva.nair@gmail.com, openvpn-devel@lists.sourceforge.net, frank@lichtenheld.com, lstipakov@gmail.com, a@unstable.cc Cc: openvpn-devel , plaisthos Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1772676550200988807?= X-GMAIL-MSGID: =?utf-8?q?1773944283692252704?= cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/321?usp=email ) 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@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26903.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(-) 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 = false; + ack_message_t ack; + struct gc_arena gc = gc_new(); + HANDLE pipe = tt->options.msg_channel; + int len = tt->options.wins_len; + int addr_len = add ? len : 0; + + if (addr_len == 0 && add) /* no addresses to add */ + { + return true; + } + + wins_cfg_message_t wins = { + .header = { + (add ? msg_add_wins_cfg : msg_del_wins_cfg), + sizeof(wins_cfg_message_t), + 0 + }, + .iface = {.index = tt->adapter_index, .name = "" }, + .addr_len = 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] = '\0'; + + if (addr_len > _countof(wins.addr)) + { + addr_len = _countof(wins.addr); + wins.addr_len = addr_len; + msg(M_WARN, "Number of WINS addresses sent to service truncated to %d", + addr_len); + } + + for (int i = 0; i < addr_len; ++i) + { + wins.addr[i].ipv4.s_addr = htonl(tt->options.wins[i]); + } + + msg(D_LOW, "%s WINS servers on '%s' (if_index = %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 != NO_ERROR) + { + msg(M_WARN, "TUN: %s WINS failed using service: %s [status=%u if_name=%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 = 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 = 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 = "delete" all addresses are deleted. + * if action = "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 = 0; + int timeout = 30000; /* in msec */ + wchar_t argv0[MAX_PATH]; + wchar_t *cmdline = NULL; + const wchar_t *addr_static = (wcscmp(action, L"set") == 0) ? L"static" : L""; + + if (!addr) + { + if (wcscmp(action, L"delete") == 0) + { + addr = 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 = L"netsh interface ip %ls wins \"%ls\" %ls %ls"; + + /* max cmdline length in wchars -- include room for worst case and some */ + size_t ncmdline = wcslen(fmt) + wcslen(if_name) + wcslen(action) + wcslen(addr) + +wcslen(addr_static) + 32 + 1; + cmdline = malloc(ncmdline * sizeof(wchar_t)); + if (!cmdline) + { + err = ERROR_OUTOFMEMORY; + goto out; + } + + openvpn_swprintf(cmdline, ncmdline, fmt, action, if_name, addr_static, addr); + + err = ExecCommand(argv0, cmdline, timeout); + +out: + free(cmdline); + return err; +} + +/** * Run command: wmic nicconfig (InterfaceIndex=$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 = 0; + wchar_t addr[16]; /* large enough to hold string representation of an ipv4 */ + int addr_len = msg->addr_len; + + /* sanity check */ + if (addr_len > _countof(msg->addr)) + { + addr_len = _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-termination of strings from client */ + { + wins_cfg_message_t *msgptr = (wins_cfg_message_t *)msg; + msgptr->iface.name[_countof(msg->iface.name) - 1] = '\0'; + } + + wchar_t *wide_name = 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 == msg_del_wins_cfg) + { + err = netsh_wins_cmd(L"delete", wide_name, NULL); + if (err) + { + goto out; + } + free(RemoveListItem(&(*lists)[undo_wins], CmpWString, wide_name)); + } + + if (msg->header.type == msg_del_wins_cfg) + { + goto out; /* job done */ + } + + for (int i = 0; i < addr_len; ++i) + { + RtlIpv4AddressToStringW(&msg->addr[i].ipv4, addr); + err = netsh_wins_cmd(i == 0 ? L"set" : L"add", wide_name, addr); + if (i == 0 && err) + { + goto out; + } + /* We do not check for duplicate addresses, so any error in adding + * additional addresses is ignored. + */ + } + + err = 0; + + if (addr_len > 0) + { + wchar_t *tmp_name = _wcsdup(wide_name); + if (!tmp_name || AddListItem(&(*lists)[undo_wins], tmp_name)) + { + free(tmp_name); + netsh_wins_cmd(L"delete", wide_name, NULL); + err = ERROR_OUTOFMEMORY; + goto out; + } + } + +out: + free(wide_name); + return err; +} + +static DWORD HandleEnableDHCPMessage(const enable_dhcp_message_t *dhcp) { DWORD err = 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 = { .header = { @@ -1547,6 +1686,11 @@ ack.error_number = HandleDNSConfigMessage(&msg.dns, lists); break; + case msg_add_wins_cfg: + case msg_del_wins_cfg: + ack.error_number = HandleWINSConfigMessage(&msg.wins, lists); + break; + case msg_enable_dhcp: if (msg.header.size == 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;