Browse code

Alias ADAPTER_DOMAIN_SUFFIX to DOMAIN

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.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200922100021.20329-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21107.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>

Lev Stipakov authored on 2020/09/22 19:00:21
Showing 2 changed files
... ...
@@ -114,6 +114,10 @@ routing.
114 114
   :code:`DOMAIN` ``name``
115 115
         Set Connection-specific DNS Suffix to :code:`name`.
116 116
 
117
+  :code:`ADAPTER_DOMAIN_SUFFIX` ``name``
118
+        Alias to :code:`DOMAIN`. This is a compatibility option, it
119
+        should not be used in new deployments.
120
+
117 121
   :code:`DOMAIN-SEARCH` ``name``
118 122
         Add :code:`name` to the domain search list.
119 123
         Repeat this option to add more entries. Up to
... ...
@@ -7440,7 +7440,8 @@ add_option(struct options *options,
7440 7440
         VERIFY_PERMISSION(OPT_P_IPWIN32);
7441 7441
         bool ipv6dns = false;
7442 7442
 
7443
-        if (streq(p[1], "DOMAIN") && p[2])
7443
+        if ((streq(p[1], "DOMAIN") || streq(p[1], "ADAPTER_DOMAIN_SUFFIX"))
7444
+            && p[2])
7444 7445
         {
7445 7446
             o->domain = p[2];
7446 7447
         }