Set WINS servers via interactice service
PATCH 1/1 Set WINS servers via interactice service
From: Lev Stipakov <[email protected]...>
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
--- include/openvpn-msg.h | 11 ++- src/openvpn/tun.c | 68 ++++++++++++++ src/openvpnserv/interactive.c | 162 ++++++++++++++++++++++++++++++++++ 3 files changed, 240 insertions(+), 1 deletion(-)
include/openvpn-msg.h +10 -1
@@ -40,7 +40,9 @@ typedef enum { 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 {
@@ -86,6 +88,13 @@ typedef struct {inet_address_t addr[4 ];/* support up to 4 dns addresses */ } dns_cfg_message_t; +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;
src/openvpn/tun.c +68 -0
86 lines not on this page · raw message
src/openvpnserv/interactive.c +162 -0
204 lines not on this page · raw message
Signature · 1 line
2.23.0.windows.1
NOTE: this is merging the v3 of the patch from Gerrit, which has an ACK in gerrit
https://gerrit.openvpn.net/c/openvpn/+/321
there are some diffs from v1 to v2, and rebase context from v2 to v3, but the gist of the patch is the same.
I have not tested this beyond "does it look safe wrt memory/array usage" and "does GHA like it?".
Your patch has been applied to the master and release/2.6 branch (it's somewhat of a bugfix, to restore missing functionality in the "with DCO" case).
commit 18826de5737789cb74b48fc40a9ff5cb37d38d98 (master) commit 64a75e75b8929f1290ba984f60d0c13447a41407 (release/2.6)
Author: Lev Stipakov Date: Thu Jul 27 18:47:06 2023 +0300
Set WINS servers via interactice service
Signed-off-by: Lev Stipakov <[email protected]...>
Acked-by: Frank Lichtenheld <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg26903.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering