Alias ADAPTER_DOMAIN_SUFFIX to DOMAIN
PATCH 1/1 Alias ADAPTER_DOMAIN_SUFFIX to DOMAIN
From: Lev Stipakov <[email protected]...>
ADAPTER_DOMAIN_SUFFIX is an openvpn3 replacement for DOMAIN, which is used there for split-dns. This is pushed by modern Access Server.
This change improves compatibility between OpenVPN community client and Access Server.
--- doc/man-sections/vpn-network-options.rst | 3 +++ src/openvpn/options.c | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-)
doc/man-sections/vpn-network-options.rst +3 -0
@@ -114,6 +114,9 @@ routing. :code:`DOMAIN` ``name`` Set Connection-specific DNS Suffix to :code:`name`. + :code:`ADAPTER_DOMAIN_SUFFIX` ``name`` + Set Connection-specific DNS Suffix to :code:`name`. + :code:`DOMAIN-SEARCH` ``name`` Add :code:`name` to the domain search list. Repeat this option to add more entries. Up to
src/openvpn/options.c +11 -10
@@ -715,16 +715,17 @@ static const char usage_message[] =" be used with --ip-win32 dynamic. For options\n" " which allow multiple addresses,\n" " --dhcp-option must be repeated.\n" -" DOMAIN name : Set DNS suffix\n" +" DOMAIN name : Set DNS suffix\n" +" ADAPTER_DOMAIN_NAME : alias to DOMAIN\n" " DOMAIN-SEARCH entry : Add entry to DNS domain search list\n" -" DNS addr : Set domain name server address(es) (IPv4 and IPv6)\n" -" NTP : Set NTP server address(es)\n" -" NBDD : Set NBDD server address(es)\n" -" WINS addr : Set WINS server address(es)\n" -" NBT type : Set NetBIOS over TCP/IP Node type\n" -" 1: B, 2: P, 4: M, 8: H\n" -" NBS id : Set NetBIOS scope ID\n" -" DISABLE-NBT : Disable Netbios-over-TCP/IP.\n" +" DNS addr : Set domain name server address(es) (IPv4 and IPv6)\n" +" NTP : Set NTP server address(es)\n" +" NBDD : Set NBDD server address(es)\n" +" WINS addr : Set WINS server address(es)\n" +" NBT type : Set NetBIOS over TCP/IP Node type\n" +" 1: B, 2: P, 4: M, 8: H\n" +" NBS id : Set NetBIOS scope ID\n" +" DISABLE-NBT : Disable Netbios-over-TCP/IP.\n" "--dhcp-renew : Ask Windows to renew the TAP adapter lease on startup.\n" "--dhcp-pre-release : Ask Windows to release the previous TAP adapter lease on\n" " startup.\n"
@@ -7440,7 +7441,7 @@ add_option(struct options *options,VERIFY_PERMISSION (OPT_P_IPWIN32 );bool ipv6dns = false; -if (streq (p[1 ],"DOMAIN" ) && p[2 ]) +if ((streq (p[1 ],"DOMAIN" ) ||streq (p[1 ],"ADAPTER_DOMAIN_SUFFIX" )) && p[2 ]) { o->domain = p[2 ]; }
Signature · 1 line
2.17.1
PATCH v2 1/1 Alias ADAPTER_DOMAIN_SUFFIX to DOMAIN
In reply to Gert DoeringFrom: Lev Stipakov <[email protected]...>
ADAPTER_DOMAIN_SUFFIX is an openvpn3 replacement for DOMAIN, which is used there for split-dns. This option is pushed by modern Access Server.
This change improves compatibility between OpenVPN community client and Access Server.
---
v2:
- fixed long line in C code
- left out --help change
- slightly changed man text
doc/man-sections/vpn-network-options.rst | 4 ++++ src/openvpn/options.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-)
doc/man-sections/vpn-network-options.rst +4 -0
@@ -114,6 +114,10 @@ routing. :code:`DOMAIN` ``name`` Set Connection-specific DNS Suffix to :code:`name`. + :code:`ADAPTER_DOMAIN_SUFFIX` ``name`` + Alias to :code:`DOMAIN`. This is a compatibility option, it + should not be used in new deployments. + :code:`DOMAIN-SEARCH` ``name`` Add :code:`name` to the domain search list. Repeat this option to add more entries. Up to
src/openvpn/options.c +2 -1
@@ -7440,7 +7440,8 @@ add_option(struct options *options,VERIFY_PERMISSION (OPT_P_IPWIN32 );bool ipv6dns = false; -if (streq (p[1 ],"DOMAIN" ) && p[2 ]) +if ((streq (p[1 ],"DOMAIN" ) ||streq (p[1 ],"ADAPTER_DOMAIN_SUFFIX" )) + && p[2 ]) { o->domain = p[2 ]; }
Signature · 1 line
2.17.1
Hi,
Quoted 8 lines · Lev Stipakov
From: Lev Stipakov <[email protected]...>
ADAPTER_DOMAIN_SUFFIXis an openvpn3 replacement for DOMAIN, which is used there for split-dns. This is pushed by modern Access Server.This change improves compatibility between OpenVPN community client and Access Server.
I agree that compatibility with AS is important, but I'd rather not *advertise* this new flag everywhere - so, accepting it as alias for DOMAIN is ok, but my gut feeling is "it should neither show up in the man page nor in the online help" - we do not want to encourage people to use it.
Also, the great re-indentation of the online help might look orderly, but makes the output actually harder to read with all the whitespace (plus, some of the resulting lines are too long). So I'm not happy with that either.
Thus, unless someone else feels very strongly otherwise, I think we should reduce this to the single-line change that adds the alias (watch out for line length!), but leave out the --help change. The man page change should mention "this is a compatibility option, and should not be used in new deployments" or so.
gert
Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany [email protected]...I think this is reasonable for AS compatibility, which is desirable. (Otherwise, I do have some reservation on "why do we need to work around uncoordinated actions on the v3/AS side in the v2 source?")
I have not tested this besides "stare at source" and "compile with MinGW", but it looks trivially correct enough.
Your patch has been applied to the master and release/2.5 branch.
commit d6720203fa9ba446497798a284c17093b92de1dc (master) commit 2062876f3a4c87a552ce5d7cb68113e349a5c872 (release/2.5)
Author: Lev Stipakov Date: Tue Sep 22 13:00:21 2020 +0300
Alias ADAPTER_DOMAIN_SUFFIX to DOMAIN
Signed-off-by: Lev Stipakov <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg21107.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering