From: "d12fk (Code Review)" Date: Mon, 28 Apr 2025 06:12:44 +0000 In-Reply-To: References: Reply-To: heiko@...515..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., lstipakov@...277... Message-ID: <654c1f8aceaa9ac56ac5af54b3c2acd897566e0d-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="h4lXlTzx2sQ="; charset=UTF-8 Subject: [Openvpn-devel] [L] Change in openvpn[master]: dns: deal with --dhcp-options when --dns is active List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld , stipa Cc: openvpn-devel --h4lXlTzx2sQ= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos, stipa. Hello flichtenheld, plaisthos, stipa, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/904?usp=3Demail to look at the new patch set (#15). The following approvals got outdated and were removed: Code-Review-1 by stipa Change subject: dns: deal with --dhcp-options when --dns is active ...................................................................... dns: deal with --dhcp-options when --dns is active Since --dns settings overrule DNS related --dhcp-options, remove the latter when values were defined via --dns. To stay as backward compatible as possible, we add foreign_options to the script hook environment from the --dns values when a --up script is defined. In that case the default --dns-updown is not run, even when --dns values are present, to prevent double DNS configuration. This way an existing --up script that deals with DNS can run, without the immediate need to change after an openvpn upgrade and a server pushing --dns options. If you specify a custom --dns-updown, or force running the default dns-updown that comes with openvpn, those compat env vars are not set for --up scripts and the dns-updown command is run, even when there's an --up script present. Since Android uses the DNS values from tuntap_options, we always override those with --dns stuff unconditionally. Also on Windows when --ip-win32 is dynamic or adaptive, since DHCP relies on these as well. Change-Id: I635c4018fb43b5976a39b6a90cb2e9cb2570cd6a Signed-off-by: Heiko Hund --- M src/openvpn/dns.c M src/openvpn/dns.h M src/openvpn/options.c 3 files changed, 315 insertions(+), 184 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/04/904/15 diff --git a/src/openvpn/dns.c b/src/openvpn/dns.c index 221e9a9..9927961 100644 --- a/src/openvpn/dns.c +++ b/src/openvpn/dns.c @@ -703,7 +703,8 @@ static void run_up_down_command(bool up, struct options *o, const struct tuntap *tt, s= truct dns_updown_runner_info *updown_runner) { - if (!o->dns_options.updown) + struct dns_options *dns =3D &o->dns_options; + if (!dns->updown || (o->up_script && !dns->user_set_updown)) { return; } @@ -713,7 +714,7 @@ if (!updown_runner->required) { /* Run dns updown directly */ - status =3D do_run_up_down_command(up, NULL, &o->dns_options, tt); + status =3D do_run_up_down_command(up, NULL, dns, tt); } else { diff --git a/src/openvpn/dns.h b/src/openvpn/dns.h index c56d603..8e3556d 100644 --- a/src/openvpn/dns.h +++ b/src/openvpn/dns.h @@ -76,7 +76,28 @@ #endif }; +#ifndef N_DHCP_ADDR +#define N_DHCP_ADDR 4 +#endif + +#ifndef N_SEARCH_LIST_LEN +#define N_SEARCH_LIST_LEN 10 +#endif + +struct dhcp_options { + in_addr_t dns[N_DHCP_ADDR]; + int dns_len; + + struct in6_addr dns6[N_DHCP_ADDR]; + int dns6_len; + + const char *domain; + const char *domain_search_list[N_SEARCH_LIST_LEN]; + int domain_search_list_len; +}; + struct dns_options { + struct dhcp_options from_dhcp; struct dns_domain *search_domains; struct dns_server *servers_prepull; struct dns_server *servers; diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 55d31f4..61da4d9c 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -1333,7 +1333,6 @@ #endif /* ifndef ENABLE_SMALL */ #endif /* ifdef _WIN32 */ -#if defined(_WIN32) || defined(TARGET_ANDROID) static void dhcp_option_dns6_parse(const char *parm, struct in6_addr *dns6_list, int *= len, int msglevel) { @@ -1376,150 +1375,6 @@ } } =20 -/* - * If DNS options are set use these for TUN/TAP options as well. - * Applies to DNS, DNS6 and DOMAIN-SEARCH. - * Existing options will be discarded. - */ -static void -tuntap_options_copy_dns(struct options *o) -{ - struct tuntap_options *tt =3D &o->tuntap_options; - struct dns_options *dns =3D &o->dns_options; - - if (dns->search_domains) - { - tt->domain_search_list_len =3D 0; - const struct dns_domain *domain =3D dns->search_domains; - while (domain && tt->domain_search_list_len < N_SEARCH_LIST_LEN) - { - tt->domain_search_list[tt->domain_search_list_len++] =3D domai= n->name; - domain =3D domain->next; - } - if (domain) - { - msg(M_WARN, "WARNING: couldn't copy all --dns search-domains t= o --dhcp-option"); - } - tt->dhcp_options |=3D DHCP_OPTIONS_DHCP_REQUIRED; - } - - if (dns->servers) - { - tt->dns_len =3D 0; - tt->dns6_len =3D 0; - bool overflow =3D false; - const struct dns_server *server =3D dns->servers; - while (server) - { - for (int i =3D 0; i < server->addr_count; ++i) - { - if (server->addr[i].family =3D=3D AF_INET) - { - if (tt->dns_len >=3D N_DHCP_ADDR) - { - overflow =3D true; - continue; - } - tt->dns[tt->dns_len++] =3D ntohl(server->addr[i].in.a4= .s_addr); - } - else - { - if (tt->dns6_len >=3D N_DHCP_ADDR) - { - overflow =3D true; - continue; - } - tt->dns6[tt->dns6_len++] =3D server->addr[i].in.a6; - } - } - server =3D server->next; - } - if (overflow) - { - msg(M_WARN, "WARNING: couldn't copy all --dns server addresses= to --dhcp-option"); - } - tt->dhcp_options |=3D DHCP_OPTIONS_DHCP_OPTIONAL; - } -} -#else /* if defined(_WIN32) || defined(TARGET_ANDROID) */ -static void -foreign_options_copy_dns(struct options *o, struct env_set *es) -{ - const struct dns_domain *domain =3D o->dns_options.search_domains; - const struct dns_server *server =3D o->dns_options.servers; - if (!domain && !server) - { - return; - } - - /* reset the index since we're starting all over again */ - int opt_max =3D o->foreign_option_index; - o->foreign_option_index =3D 0; - - for (int i =3D 1; i <=3D opt_max; ++i) - { - char name[32]; - snprintf(name, sizeof(name), "foreign_option_%d", i); - - const char *env_str =3D env_set_get(es, name); - const char *value =3D strchr(env_str, '=3D') + 1; - if ((domain && strstr(value, "dhcp-option DOMAIN-SEARCH") =3D=3D v= alue) - || (server && strstr(value, "dhcp-option DNS") =3D=3D value)) - { - setenv_del(es, name); - } - else - { - setenv_foreign_option(o, &value, 1, es); - } - } - - struct gc_arena gc =3D gc_new(); - - while (server) - { - for (size_t i =3D 0; i < server->addr_count; ++i) - { - if (server->addr[i].family =3D=3D AF_INET) - { - const char *argv[] =3D { - "dhcp-option", - "DNS", - print_in_addr_t(server->addr[i].in.a4.s_addr, 0, &gc) - }; - setenv_foreign_option(o, argv, 3, es); - } - else - { - const char *argv[] =3D { - "dhcp-option", - "DNS6", - print_in6_addr(server->addr[i].in.a6, 0, &gc) - }; - setenv_foreign_option(o, argv, 3, es); - } - } - server =3D server->next; - } - while (domain) - { - const char *argv[] =3D { "dhcp-option", "DOMAIN-SEARCH", domain->n= ame }; - setenv_foreign_option(o, argv, 3, es); - domain =3D domain->next; - } - - gc_free(&gc); - - /* remove old leftover entries */ - while (o->foreign_option_index < opt_max) - { - char name[32]; - snprintf(name, sizeof(name), "foreign_option_%d", opt_max--); - setenv_del(es, name); - } -} -#endif /* if defined(_WIN32) || defined(TARGET_ANDROID) */ - #ifndef ENABLE_SMALL static const char * print_vlan_accept(enum vlan_acceptable_frames mode) @@ -3617,6 +3472,260 @@ } } +#if defined(_WIN32) || defined(TARGET_ANDROID) +/** + * @brief Postprocess DNS related settings + * + * Set TUN/TAP DNS options with values from either --dns + * or --dhcp-option. + * + * @param o pointer to the options struct + */ +static void +tuntap_options_postprocess_dns(struct options *o) +{ + struct dns_options *dns =3D &o->dns_options; + struct tuntap_options *tt =3D &o->tuntap_options; + if (!dns->servers) + { + /* Copy --dhcp-options to tuntap_options */ + struct dhcp_options *dhcp =3D &dns->from_dhcp; + assert(sizeof(dhcp->dns) =3D=3D sizeof(tt->dns)); + assert(sizeof(dhcp->dns6) =3D=3D sizeof(tt->dns6)); + assert(sizeof(dhcp->domain_search_list) =3D=3D sizeof(tt->domain_s= earch_list)); + + tt->domain =3D dhcp->domain; + tt->dns_len =3D dhcp->dns_len; + tt->dns6_len =3D dhcp->dns6_len; + + memcpy(tt->dns, dhcp->dns, sizeof(tt->dns)); + memcpy(tt->dns6, dhcp->dns6, sizeof(tt->dns6)); + + tt->domain_search_list_len =3D dhcp->domain_search_list_len; + for (size_t i =3D 0; i < SIZE(tt->domain_search_list); ++i) + { + tt->domain_search_list[i] =3D dhcp->domain_search_list[i]; + } + + return; + } + +#if defined(_WIN32) + if (tt->ip_win32_type !=3D IPW32_SET_DHCP_MASQ && tt->ip_win32_type != =3D IPW32_SET_ADAPTIVE) + { + return; /* Not in DHCP mode */ + } +#endif /* if defined(_WIN32) */ + + /* Copy --dns options to tuntap_options */ + const struct dns_domain *d =3D dns->search_domains; + while (d && tt->domain_search_list_len + 1 < N_SEARCH_LIST_LEN) + { + tt->domain_search_list[tt->domain_search_list_len++] =3D d->name; + d =3D d->next; + } + if (d) + { + msg(M_WARN, "WARNING: couldn't copy all --dns search-domains to TU= N/TAP"); + } + + const struct dns_server *s =3D dns->servers; + while (s) + { + bool non_standard_server_port =3D false; + for (int i =3D 0; i < s->addr_count; ++i) + { + if (s->addr[i].port && s->addr[i].port !=3D 53) + { + non_standard_server_port =3D true; + break; + } + } + if ((s->transport && s->transport !=3D DNS_TRANSPORT_PLAIN) + || (s->dnssec && s->dnssec !=3D DNS_SECURITY_NO) + || non_standard_server_port) + { + /* Skip servers requiring unsupported config to be set */ + s =3D s->next; + } + else + { + bool overflow =3D false; + for (int i =3D 0; i < s->addr_count; ++i) + { + if (s->addr[i].family =3D=3D AF_INET && tt->dns_len + 1 < = N_DHCP_ADDR) + { + tt->dns[tt->dns_len++] =3D s->addr[i].in.a4.s_addr; + } + else if (tt->dns6_len + 1 < N_DHCP_ADDR) + { + tt->dns6[tt->dns6_len] =3D s->addr[i].in.a6; + } + else + { + overflow =3D true; + } + } + if (overflow) + { + msg(M_WARN, "WARNING: couldn't copy all --dns server addre= sses to TUN/TAP"); + } + return; + } + } +} + +#else /* if defined(_WIN32) || defined(TARGET_ANDROID) */ + +/** + * @brief Postprocess DNS related settings + * + * Discard existing --dhcp-options from the env if needed and possibly + * replace them with values from --dns. If no --dns servers are set copy + * the --dhcp-option values over for --dns-updown runs. + * + * @param o pointer to the options struct + * @param es env set to modify potentially + */ +static void +dhcp_options_postprocess_dns(struct options *o, struct env_set *es) +{ + struct gc_arena gc =3D gc_new(); + struct dns_options *dns =3D &o->dns_options; + + if (dns->servers || dns->user_set_updown) + { + /* Clean up env from --dhcp-option DNS config */ + struct buffer name =3D alloc_buf_gc(OPTION_PARM_SIZE, &gc); + struct buffer value =3D alloc_buf_gc(OPTION_PARM_SIZE, &gc); + + const int fo_count =3D o->foreign_option_index; + o->foreign_option_index =3D 0; + + for (int i =3D 1; i <=3D fo_count; ++i) + { + buf_clear(&name); + buf_printf(&name, "foreign_option_%d", i); + const char *env_str =3D env_set_get(es, BSTR(&name)); + const char *item_val =3D strchr(env_str, '=3D') + 1; + buf_clear(&value); + buf_printf(&value, "%s", item_val); + + /* Remove foreign option item from env set */ + env_set_del(es, BSTR(&name)); + + item_val =3D BSTR(&value); + if (strncmp(item_val, "dhcp-option ", 12) !=3D 0 + || (strncmp(item_val + 12, "ADAPTER-DOMAIN-SUFFIX ", 22) != =3D 0 + && strncmp(item_val + 12, "DOMAIN-SEARCH ", 14) !=3D 0 + && strncmp(item_val + 12, "DOMAIN ", 7) !=3D 0 + && strncmp(item_val + 12, "DNS6 ", 5) !=3D 0 + && strncmp(item_val + 12, "DNS ", 4) !=3D 0)) + { + /* Re-set the item with potentially updated name */ + buf_clear(&name); + buf_printf(&name, "foreign_option_%d", ++o->foreign_option= _index); + setenv_str(es, BSTR(&name), BSTR(&value)); + } + } + } + + if (!dns->servers) + { + /* Copy --dhcp-options to dns_options */ + struct dhcp_options *dhcp =3D &dns->from_dhcp; + + if (dhcp->dns_len || dhcp->dns6_len) + { + struct dns_domain **entry =3D &dns->search_domains; + ALLOC_OBJ_CLEAR_GC(*entry, struct dns_domain, &dns->gc); + struct dns_domain *new =3D *entry; + new->name =3D dhcp->domain; + entry =3D &new->next; + + for (size_t i =3D 0; i < dhcp->domain_search_list_len; ++i) + { + ALLOC_OBJ_CLEAR_GC(*entry, struct dns_domain, &dns->gc); + struct dns_domain *new =3D *entry; + new->name =3D dhcp->domain_search_list[i]; + entry =3D &new->next; + } + + struct dns_server *server =3D dns_server_get(&dns->servers, 0,= &dns->gc); + const size_t max_addrs =3D SIZE(server->addr); + for (size_t i =3D 0; i < dhcp->dns_len && server->addr_count <= max_addrs; ++i) + { + server->addr[server->addr_count].in.a4.s_addr =3D htonl(dh= cp->dns[i]); + server->addr[server->addr_count].family =3D AF_INET; + server->addr_count +=3D 1; + } + for (size_t i =3D 0; i < dhcp->dns6_len && server->addr_count = < max_addrs; ++i) + { + server->addr[server->addr_count].in.a6 =3D dhcp->dns6[i]; + server->addr[server->addr_count].family =3D AF_INET6; + server->addr_count +=3D 1; + } + } + } + else if (o->up_script && !dns->user_set_updown) + { + /* Set foreign option env vars from --dns config */ + const char *p[] =3D { "dhcp-option", NULL, NULL }; + size_t p_len =3D sizeof(p) / sizeof(p[0]); + + p[1] =3D "DOMAIN"; + const struct dns_domain *d =3D dns->search_domains; + while (d) + { + p[2] =3D d->name; + setenv_foreign_option(o, (const char **)p, p_len, es); + d =3D d->next; + } + + const struct dns_server *s =3D dns->servers; + while (s) + { + bool non_standard_server_port =3D false; + for (int i =3D 0; i < s->addr_count; ++i) + { + if (s->addr[i].port && s->addr[i].port !=3D 53) + { + non_standard_server_port =3D true; + break; + } + } + if ((s->transport && s->transport !=3D DNS_TRANSPORT_PLAIN) + || (s->dnssec && s->dnssec !=3D DNS_SECURITY_NO) + || non_standard_server_port) + { + /* Skip servers requiring unsupported config to be set */ + s =3D s->next; + } + else + { + for (int i =3D 0; i < s->addr_count; ++i) + { + if (s->addr[i].family =3D=3D AF_INET) + { + p[1] =3D "DNS"; + p[2] =3D print_in_addr_t(s->addr[i].in.a4.s_addr, = IA_NET_ORDER, &gc); + } + else + { + p[1] =3D "DNS6"; + p[2] =3D print_in6_addr(s->addr[i].in.a6, 0, &gc); + } + setenv_foreign_option(o, (const char **)p, p_len, es); + } + break; + } + } + } + + gc_free(&gc); +} +#endif /* if defined(_WIN32) || defined(TARGET_ANDROID) */ + static void options_postprocess_mutate(struct options *o, struct env_set *es) { @@ -3802,9 +3911,9 @@ else { #if defined(_WIN32) || defined(TARGET_ANDROID) - tuntap_options_copy_dns(o); + tuntap_options_postprocess_dns(o); #else - foreign_options_copy_dns(o, es); + dhcp_options_postprocess_dns(o, es); #endif } if (o->auth_token_generate && !o->auth_token_renewal) @@ -4187,9 +4296,9 @@ { dns_options_postprocess_pull(&o->dns_options); #if defined(_WIN32) || defined(TARGET_ANDROID) - tuntap_options_copy_dns(o); + tuntap_options_postprocess_dns(o); #else - foreign_options_copy_dns(o, es); + dhcp_options_postprocess_dns(o, es); #endif } return success; @@ -8210,18 +8319,43 @@ goto err; } } -#if defined(_WIN32) || defined(TARGET_ANDROID) else if (streq(p[0], "dhcp-option") && p[1]) { + struct dhcp_options *dhcp =3D &options->dns_options.from_dhcp; +#if defined(_WIN32) || defined(TARGET_ANDROID) struct tuntap_options *o =3D &options->tuntap_options; +#endif VERIFY_PERMISSION(OPT_P_DHCPDNS); - if ((streq(p[1], "DOMAIN") || streq(p[1], "ADAPTER_DOMAIN_SUFFIX")) - && p[2] && !p[3]) + if ((streq(p[1], "DOMAIN") || streq(p[1], "ADAPTER_DOMAIN_SUFFIX")= ) && p[2] && !p[3]) { - o->domain =3D p[2]; - o->dhcp_options |=3D DHCP_OPTIONS_DHCP_OPTIONAL; + dhcp->domain =3D p[2]; } + else if (streq(p[1], "DOMAIN-SEARCH") && p[2] && !p[3]) + { + if (dhcp->domain_search_list_len < N_SEARCH_LIST_LEN) + { + dhcp->domain_search_list[dhcp->domain_search_list_len++] = =3D p[2]; + } + else + { + msg(msglevel, "--dhcp-option %s: maximum of %d search entr= ies can be specified", + p[1], N_SEARCH_LIST_LEN); + } + } + else if ((streq(p[1], "DNS") || streq(p[1], "DNS6")) && p[2] && !p= [3] + && (!strstr(p[2], ":") || ipv6_addr_safe(p[2]))) + { + if (strstr(p[2], ":")) + { + dhcp_option_dns6_parse(p[2], dhcp->dns6, &dhcp->dns6_len, = msglevel); + } + else + { + dhcp_option_address_parse("DNS", p[2], dhcp->dns, &dhcp->d= ns_len, msglevel); + } + } +#if defined(_WIN32) || defined(TARGET_ANDROID) else if (streq(p[1], "NBS") && p[2] && !p[3]) { o->netbios_scope =3D p[2]; @@ -8239,23 +8373,9 @@ o->netbios_node_type =3D t; o->dhcp_options |=3D DHCP_OPTIONS_DHCP_REQUIRED; } - else if ((streq(p[1], "DNS") || streq(p[1], "DNS6")) && p[2] && !p= [3] - && (!strstr(p[2], ":") || ipv6_addr_safe(p[2]))) - { - if (strstr(p[2], ":")) - { - dhcp_option_dns6_parse(p[2], o->dns6, &o->dns6_len, msglev= el); - } - else - { - dhcp_option_address_parse("DNS", p[2], o->dns, &o->dns_len= , msglevel); - o->dhcp_options |=3D DHCP_OPTIONS_DHCP_OPTIONAL; - } - } else if (streq(p[1], "WINS") && p[2] && !p[3]) { dhcp_option_address_parse("WINS", p[2], o->wins, &o->wins_len,= msglevel); - o->dhcp_options |=3D DHCP_OPTIONS_DHCP_OPTIONAL; } else if (streq(p[1], "NTP") && p[2] && !p[3]) { @@ -8267,19 +8387,6 @@ dhcp_option_address_parse("NBDD", p[2], o->nbdd, &o->nbdd_len,= msglevel); o->dhcp_options |=3D DHCP_OPTIONS_DHCP_REQUIRED; } - else if (streq(p[1], "DOMAIN-SEARCH") && p[2] && !p[3]) - { - if (o->domain_search_list_len < N_SEARCH_LIST_LEN) - { - o->domain_search_list[o->domain_search_list_len++] =3D p[2= ]; - } - else - { - msg(msglevel, "--dhcp-option %s: maximum of %d search entr= ies can be specified", - p[1], N_SEARCH_LIST_LEN); - } - o->dhcp_options |=3D DHCP_OPTIONS_DHCP_OPTIONAL; - } else if (streq(p[1], "DISABLE-NBT") && !p[2]) { o->disable_nbt =3D 1; @@ -8297,8 +8404,10 @@ msg(msglevel, "--dhcp-option: unknown option type '%s' or miss= ing or unknown parameter", p[1]); goto err; } - } +#else /* if defined(_WIN32) || defined(TARGET_ANDROID) */ + setenv_foreign_option(options, (const char **)p, 3, es); #endif /* if defined(_WIN32) || defined(TARGET_ANDROID) */ + } #ifdef _WIN32 else if (streq(p[0], "show-adapters") && !p[1]) { -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/904?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I635c4018fb43b5976a39b6a90cb2e9cb2570cd6a Gerrit-Change-Number: 904 Gerrit-PatchSet: 15 Gerrit-Owner: d12fk Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-Reviewer: stipa Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Attention: stipa Gerrit-MessageType: newpatchset --h4lXlTzx2sQ= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos, stipa. <= /p>

d12fk uploaded patch set #15 to this change.

View Change

The following approvals got outdated and were removed: Code-Review-1 by stipa

dns: deal with --dhcp-options when --dns is active
Since --dns settings overrule DNS related --dhcp-options,
remove t= he latter when values were defined via --dns.

To stay as backward co= mpatible as possible, we add foreign_options to
the script hook environm= ent from the --dns values when a --up script
is defined. In that case th= e default --dns-updown is not run, even
when --dns values are present, t= o prevent double DNS configuration.
This way an existing --up script tha= t deals with DNS can run, without
the immediate need to change after an = openvpn upgrade and a server
pushing --dns options.

If you specif= y a custom --dns-updown, or force running the default
dns-updown that co= mes with openvpn, those compat env vars are not set
for --up scripts and= the dns-updown command is run, even when there's
an --up script pre= sent.

Since Android uses the DNS values from tuntap_options, we alwa= ys
override those with --dns stuff unconditionally. Also on Windows when=
--ip-win32 is dynamic or adaptive, since DHCP relies on these as well.<= br>
Change-Id: I635c4018fb43b5976a39b6a90cb2e9cb2570cd6a
Signed-off-b= y: Heiko Hund <heiko@...2662...>
---
M src/openvpn/dns.c
M s= rc/openvpn/dns.h
M src/openvpn/options.c
3 files changed, 315 inserti= ons(+), 184 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/=
openvpn refs/changes/04/904/15
diff --git a/src/openvpn/dns.c b/src=
/openvpn/dns.c
index 221e9a9..9927961 100644
--- a/src/openvpn/dns.c
+++ b/src/openvpn/dns.c@@ -703,7 +703,8 @@
static void
ru= n_up_down_command(bool up, struct options *o, const struct tuntap *tt, stru= ct dns_updown_runner_info *updown_runner)
{
- if (!o->dns_options.updown)
+ struct dns_option= s *dns =3D &o->dns_options;
+ if (!dns->updown || (o->up_script && !dns-= >user_set_updown))
{
retur= n;
}
@@ -713,7 +714,7 @@
if (!updown_runner->required)
{
<= span> /* Run dns updown directly */
- status =3D do_run_up_down_command(up, NULL, &= amp;o->dns_options, tt);
+ status =3D do_run_up_down_command(up, NULL, dns, tt);
}
else
{diff --git a/src/openvpn/dns.h b/src/openvpn/dns.h
= index c56d603..8e3556d 100644
--- a/src/openvpn/dns.h
+++ b/src/openvpn/dns.h
@@ -76,7 +76,28 @@
#endif
};

+#ifndef N_DHCP_ADDR
+#define N_DHCP_ADDR 4
+#endif
+
+#ifndef N_SEARCH_LIST_LEN
+#define N_SEARCH_LIST_LEN 10
+#endif
+
+struct dhc= p_options {
+ in_a= ddr_t dns[N_DHCP_ADDR];
+ int dns_len;
= +
+ struct in6_add= r dns6[N_DHCP_ADDR];
= + int dns6_len;
+<= /span>
+ const char *doma= in;
+ const char *= domain_search_list[N_SEARCH_LIST_LEN];
+ int domain_search_list_len;
+};
+
struct dns_options {
+ struct dhcp_options from_dhcp;=
struct dns_domain *search_domains;
stru= ct dns_server *servers_prepull;
struct dns_server *ser= vers;
diff --git a/src/openvpn/options.c b/src/openvpn/opti= ons.c
index 55d31f4..61da4d9c 100644
--- a/= src/openvpn/options.c
+++ b/src/openvpn/options.c@@ -1333,7 +1333,6 @@
#endif /* ifndef ENABLE_SMALL= */
#endif /* ifdef _WIN32 */

= -#if defined(_WIN32) || defined(T= ARGET_ANDROID)
static void
dhcp_option_dn= s6_parse(const char *parm, struct in6_addr *dns6_list, int *len, int msglev= el)
{
@@ -1376,150 +1375,6 @@
}

}

-/*
- * If DNS options are set use these for TUN/TAP options as well.

- * Applies to DNS, DNS6 a= nd DOMAIN-SEARCH.
- * E= xisting options will be discarded.
- */
-stati= c void
-tuntap_options_= copy_dns(struct options *o)
-{
- struct tun= tap_options *tt =3D &o->tuntap_options;
- struct dns_options *dns =3D &o->dns_opt= ions;
-
- if (dns->search_domains)
- {
- tt->domain_search_list_len =3D 0= ;
- const struct= dns_domain *domain =3D dns->search_domains;
- while (domain && tt->domain_se= arch_list_len < N_SEARCH_LIST_LEN)
- {
- tt->domain_search_list[tt->domain_search_list_len++] = =3D domain->name;
- = domain =3D domain->next;
- }
- if (domain)
- = msg(M_WARN, "WARNING: couldn't copy all --dns search-domains to= --dhcp-option");
= - }
- tt-= >dhcp_options |=3D DHCP_OPTIONS_DHCP_REQUIRED;
- }
-
- if (d= ns->servers)
- {<= /span>
- tt->dns_len= =3D 0;
- tt->= ;dns6_len =3D 0;
- = bool overflow =3D false;
- const struct dns_server *server =3D dns->servers;- while (server)<= br>- {
- for (int i =3D 0; i < serv= er->addr_count; ++i)
- {
- = if (server->addr[i].family =3D=3D AF_INET)
- {
- if (tt->dns_len >= =3D N_DHCP_ADDR)
- = {
- = overflow =3D true;
- continue;
- }
- tt->dns[tt->dns_len++= ] =3D ntohl(server->addr[i].in.a4.s_addr);
- }
- else
- {
- if (tt->dns6_len >=3D N_DHCP_ADDR)=
- {=
- = overflow =3D true;
-= continue;
- }
- tt->dns6[tt->dns6_len++] =3D server-&= gt;addr[i].in.a6;
- = }
- = }
- serv= er =3D server->next;
- }
- if= (overflow)
- {<= /span>
- msg(M_WARN= , "WARNING: couldn't copy all --dns server addresses to --dhcp-opt= ion");
- }<= /span>
- tt->dhcp_op= tions |=3D DHCP_OPTIONS_DHCP_OPTIONAL;
- }
= -}
-#else /* if defined= (_WIN32) || defined(TARGET_ANDROID) */
-static void
-foreign_options_copy_dns(struct options *o, struct env_set *es)

-{
- const struct dns_domain *domain =3D o->= dns_options.search_domains;
- const struct dns_server *server =3D o->dns_options.servers;
- if (!domain &&am= p; !server)
- {

- return;
= - }
-
- /* reset the index since we're starting all over again */
- int opt_max =3D o->= ;foreign_option_index;
= - o->foreign_option_index =3D 0;
-
- = for (int i =3D 1; i <=3D opt_max; ++i)
- {
- char name[32];
- snprintf(name, sizeof(name), "foreign_option_%d", i)= ;
-
- const char *env_str =3D env_set_g= et(es, name);
- = const char *value =3D strchr(env_str, '=3D') + 1;
- if ((domain && strstr(v= alue, "dhcp-option DOMAIN-SEARCH") =3D=3D value)
- || (server && strs= tr(value, "dhcp-option DNS") =3D=3D value))
- {
- setenv_del(es, name);
- }
- else
- {
- = setenv_foreign_option(o, &value, 1, es);
- }
- }
-
- struct gc_a= rena gc =3D gc_new();
-=
- while (server)
- {
- for (size_t i =3D 0; i < serv= er->addr_count; ++i)
- {
- = if (server->addr[i].family =3D=3D AF_INET)
- {
- const char *argv[] =3D {
- "dhcp-option&= quot;,
- = "DNS",
-= print_in_addr_t(server->addr[i].in.a4.s_addr, 0, &am= p;gc)
- = };
- set= env_foreign_option(o, argv, 3, es);
- }
- else
= - {
- = const char *argv[] =3D {
- "dhcp-option",
- "DNS6",
- prin= t_in6_addr(server->addr[i].in.a6, 0, &gc)
- };
- setenv_foreign_option(o, argv, 3, e= s);
- }
- }
- server =3D server->next;
- }
- while (domain)
- {
- const char *argv[] =3D { "dhcp-option", &= quot;DOMAIN-SEARCH", domain->name };
- setenv_foreign_option(o, argv, 3, es);
- domain =3D domain-&= gt;next;
- }<= br>-
- gc_free(&gc);
-
- /* remove old leftover entries */
- while (o->foreign_option_index < opt_max)
- {
- char name[32];
- snprintf(name, sizeof(name), &qu= ot;foreign_option_%d", opt_max--);
- setenv_del(es, name);
- }
-}
-#endif /* = if defined(_WIN32) || defined(TARGET_ANDROID) */
-
#ifndef ENABLE_SMALL static const char *
print_vlan_accept(enum vlan_ac= ceptable_frames mode)
@@ -3617,6 +3472,260 @@
}

}

+#if defined(_WIN32) || defined(TARGET_ANDROID)
+/**
+ * @brief Postprocess DNS related set= tings
+ *
<= span style=3D"color: hsl(120, 100%, 40%);">+ * Set TUN/TAP DNS options with= values from either --dns

+ * or --dhcp-option.
+ *
+ * @param = o pointer to the options struct
+ */
+= static void
+tuntap_o= ptions_postprocess_dns(struct options *o)
+{
+ struct dns_options *dns =3D &o->dns_options;
+ struct tuntap_options *tt =3D &= amp;o->tuntap_options;

+ if (!dns->servers)
+ {
+ = /* Copy --dhcp-options to tuntap_options */
+ struct dhcp_options *dhcp =3D &dn= s->from_dhcp;
+ = assert(sizeof(dhcp->dns) =3D=3D sizeof(tt->dns));
+ assert(sizeof(dhcp->dns= 6) =3D=3D sizeof(tt->dns6));

+ assert(sizeof(dhcp->domain_search_list) =3D=3D sizeo= f(tt->domain_search_list));
+
+ = tt->domain =3D dhcp->domain;
+ tt->dns_len =3D dhcp->dns_len;
+ tt->dns6_len =3D dhcp-&g= t;dns6_len;

+<= br>+ memcpy(tt->dns, = dhcp->dns, sizeof(tt->dns));
+ memcpy(tt->dns6, dhcp->dns6, sizeof(tt->dns= 6));
+
+ tt->domain_search_list_= len =3D dhcp->domain_search_list_len;

+ for (size_t i =3D 0; i < SIZE(tt->domain= _search_list); ++i)
+= {
+ = tt->domain_search_list[i] =3D dhcp->domain_search_list[i];+ }
+
+ return;
+ }
+=
+#if defined(_WIN32)=
+ if (tt->ip_w= in32_type !=3D IPW32_SET_DHCP_MASQ && tt->ip_win32_type !=3D IPW= 32_SET_ADAPTIVE)
+ = {
+ return; = /* Not in DHCP mode */
+ }
+#endif /= * if defined(_WIN32) */
+
+ /* Copy --d= ns options to tuntap_options */
+ const struct dns_domain *d =3D dns->search_domains;
+ while (d && = tt->domain_search_list_len + 1 < N_SEARCH_LIST_LEN)
+ {
+ tt->domain_search_list[tt->domain_sea= rch_list_len++] =3D d->name;
+ d =3D d->next;
+ }
+ if (d)
+ {=
+ msg(M_WARN,= "WARNING: couldn't copy all --dns search-domains to TUN/TAP"= );
+ }
<= span style=3D"color: hsl(120, 100%, 40%);">+

+ const struct dns_server *s =3D dns->servers= ;
+ while (s)
+ {
+ bool non_standard_server_port = =3D false;
+ f= or (int i =3D 0; i < s->addr_count; ++i)
+ {
+ if (s->addr[i].port && s->addr[i= ].port !=3D 53)
+ = {
+ = non_standard_server_port =3D true;
+ break;
+ }
+ }
+ if ((s->transport && s->transport !=3D DNS_TR= ANSPORT_PLAIN)
+ = || (s->dnssec && s->dnssec !=3D DNS_SECURITY_NO)
+ || non_standa= rd_server_port)
+ = {
+ /*= Skip servers requiring unsupported config to be set */
+ s =3D s->next;+ }
+ else
+ {
+ bool overflow =3D false;
+ for (int i =3D 0; i < s-= >addr_count; ++i)
= + {
+ = if (s->addr[i].family =3D=3D AF_INET && tt->dns_le= n + 1 < N_DHCP_ADDR)
+ {
+ tt->dns[tt->dns_len++] =3D s->addr[i].in.a4.= s_addr;
+ = }
+ = else if (tt->dns6_len + 1 < N_DHCP_ADDR)
+ {
+ tt->dns6[tt->dns6_len]= =3D s->addr[i].in.a6;
+ }
+ else
+ {
+ }
+ }
+ if (overflow)
+ {
+ msg(M_WARN, "WARNING: couldn't copy = all --dns server addresses to TUN/TAP");
+ }
+ return;
+ }
+ }
+}
+
+#else /* if defined(_WIN32) || defined(TA= RGET_ANDROID) */
+
+/**
+ * @brief Postprocess DNS related sett= ings
+ *
+ * Discard existing --dhcp-optio= ns from the env if needed and possibly

+ * replace them with values from --dns. If no --dns serv= ers are set copy
+ * = the --dhcp-option values over for --dns-updown runs.
+ *
+ * @param o pointer to the options struct
+ * @param es env set to modif= y potentially

+ */
+static void
= +dhcp_options_postprocess_dns(s= truct options *o, struct env_set *es)
+{
+= struct gc_arena gc =3D gc_new();
+ struct dns_options *dns =3D &o->dns_options;
+
+ if (dns->servers || dns->user_s= et_updown)
+ {
+ /* Clean up env= from --dhcp-option DNS config */
+ struct buffer name =3D alloc_buf_gc(OPTION_PARM_SIZE,= &gc);
+ s= truct buffer value =3D alloc_buf_gc(OPTION_PARM_SIZE, &gc);
<= span style=3D"color: hsl(120, 100%, 40%);">+

+ const int fo_count =3D o->foreign_optio= n_index;
+ o-&= gt;foreign_option_index =3D 0;
+
+ = for (int i =3D 1; i <=3D fo_count; ++i)
+ {
+ buf_clear(&name);
+ buf_printf(&name, "foreign_= option_%d", i);
= + const char *env_str =3D env_set_get(es, BSTR(&name));
+ const char *= item_val =3D strchr(env_str, '=3D') + 1;
+ buf_clear(&value);
<= span style=3D"color: hsl(120, 100%, 40%);">+ buf_printf(&val= ue, "%s", item_val);

+
+ = /* Remove foreign option item from env set */
+ env_set_del(es, BSTR(&name));=
+
+ item_val =3D BSTR(&val= ue);
+ if = (strncmp(item_val, "dhcp-option ", 12) !=3D 0
+ || (strncmp(item_val + = 12, "ADAPTER-DOMAIN-SUFFIX ", 22) !=3D 0
+ && strncmp(item_= val + 12, "DOMAIN-SEARCH ", 14) !=3D 0
+ && strncmp(item_va= l + 12, "DOMAIN ", 7) !=3D 0
+ && strncmp(item_val + 12, &q= uot;DNS6 ", 5) !=3D 0
+ && strncmp(item_val + 12, "DNS &quo= t;, 4) !=3D 0))
+ = {
+ = /* Re-set the item with potentially updated name */
+ buf_clear(&name);=
+ buf= _printf(&name, "foreign_option_%d", ++o->foreign_option_in= dex);
+ = setenv_str(es, BSTR(&name), BSTR(&value));
+ }
+ }
+ }
+
+ if (!dns-&g= t;servers)
+ {
+ /* Copy --dhcp-= options to dns_options */
+ struct dhcp_options *dhcp =3D &dns->from_dhcp;<= br>+
+ if (dhcp->dns_len || dhcp->dns6_= len)
+ {
+ struct dns_do= main **entry =3D &dns->search_domains;
+ ALLOC_OBJ_CLEAR_GC(*entry, struct dns= _domain, &dns->gc);
+ struct dns_domain *new =3D *entry;
+ new->name =3D dhcp->dom= ain;
+ ent= ry =3D &new->next;
+
+ f= or (size_t i =3D 0; i < dhcp->domain_search_list_len; ++i)
= + {
+ ALLOC_OBJ_CLEAR_GC(*= entry, struct dns_domain, &dns->gc);
+ struct dns_domain *new =3D *entry;<= /span>
+ new-= >name =3D dhcp->domain_search_list[i];
+ entry =3D &new->next;
+ }
<= span style=3D"color: hsl(120, 100%, 40%);">+

+ struct dns_server *server =3D dns_serv= er_get(&dns->servers, 0, &dns->gc);
+ const size_t max_addrs =3D SIZE(s= erver->addr);
+ = for (size_t i =3D 0; i < dhcp->dns_len && server->= ;addr_count < max_addrs; ++i)
+ {
+ server->addr[server->addr_count].in.a4.s_addr = =3D htonl(dhcp->dns[i]);
+ server->addr[server->addr_count].family =3D A= F_INET;
+ = server->addr_count +=3D 1;
+ }
+ for (size_t i =3D 0; i < dhcp->dns6_len &&= ; server->addr_count < max_addrs; ++i)
+ {
+ server->addr[server->addr_count].i= n.a6 =3D dhcp->dns6[i];
+ server->addr[server->addr_count].family =3D AF= _INET6;
+ = server->addr_count +=3D 1;
+ }
+ }
+ = }
+ else if (o-&= gt;up_script && !dns->user_set_updown)
+ {
+ /* Set foreign option env vars from --dns config */=
+ const char = *p[] =3D { "dhcp-option", NULL, NULL };
+ size_t p_len =3D sizeof(p) / sizeof(p= [0]);
+
+ p[1] =3D "DOMAIN&quo= t;;

+ const st= ruct dns_domain *d =3D dns->search_domains;
+ while (d)
+ {
+ p[2] =3D d->name;
+ setenv_foreign_option(o, (const cha= r **)p, p_len, es);
+= d =3D d->next;
+ }
+=
+ const struc= t dns_server *s =3D dns->servers;
+ while (s)
+ {
+ bool non_standard_server_port =3D false;
+ for (int i =3D 0; i < = s->addr_count; ++i)
+ = if (s->addr[i].port && s->addr[i].port !=3D 53)<= /span>
+ {
+ no= n_standard_server_port =3D true;
+ break;
+ }
+ }
+ if ((s->transport && s->transport != =3D DNS_TRANSPORT_PLAIN)
+ || (s->dnssec && s->dnssec !=3D DNS_SECU= RITY_NO)
+ = || non_standard_server_port)
+ {
+ /* Skip servers requiring unsupported config to be = set */
+ = s =3D s->next;
= + }
+ = else
+ = {
+ = for (int i =3D 0; i < s->addr_count; ++i)
+ {
+ if (s->addr[i].family = =3D=3D AF_INET)
+ = {
+ = p[1] =3D "DNS";
+ p[2] =3D print_in_addr_= t(s->addr[i].in.a4.s_addr, IA_NET_ORDER, &gc);
+ }
+ else
+ {

+ p[1] =3D= "DNS6";

+ = p[2] =3D print_in6_addr(s->addr[i].in.a6, 0, &= ;gc);
+ = }
+ = setenv_foreign_option(o, (const char **)p, p_len, es);
+ }

+ break;

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

+ }
+ }
+
+ g= c_free(&gc);
+}
+#endif /* if defined(= _WIN32) || defined(TARGET_ANDROID) */
+
static void
options_po= stprocess_mutate(struct options *o, struct env_set *es)
{<= /span>
@@ -3802,9 +3911,9 @@
else
<= span> {

#if defined(_WIN32) || defined(TARGET_ANDROID)=
- tuntap_option= s_copy_dns(o);
+ = tuntap_options_postprocess_dns(o);
#else
- foreign_options_copy_dns(o, = es);

+ dhcp_op= tions_postprocess_dns(o, es);
#endif
= }
if (o->auth_token_generate && !o->auth= _token_renewal)
@@ -4187,9 +4296,9 @@
= {
dns_options_postprocess_pull(&o->dns_opti= ons);
#if defined(_WIN32) || defined(TARGET_ANDROID)
- tuntap_options_copy= _dns(o);
+ tun= tap_options_postprocess_dns(o);
#else
- foreign_options_copy_dns(o, es);
+ dhcp_options_= postprocess_dns(o, es);
#endif
}
return success;
@@ -8210,18 +8319,43 @@
goto err;
}
<= span> }

-#if define= d(_WIN32) || defined(TARGET_ANDROID)
else if (streq(p[= 0], "dhcp-option") && p[1])
{=
+ struct dhcp_option= s *dhcp =3D &options->dns_options.from_dhcp;
+#if defined(_WIN32) || defined(TARGET_AND= ROID)
struct tuntap_options *o =3D &options-&g= t;tuntap_options;
+#e= ndif
VERIFY_PERMISSION(OPT_P_DHCPDNS);
<= span>

- if ((st= req(p[1], "DOMAIN") || streq(p[1], "ADAPTER_DOMAIN_SUFFIX&qu= ot;))
- &= ;& p[2] && !p[3])
+ if ((streq(p[1], "DOMAIN") || streq(p[1], "= ;ADAPTER_DOMAIN_SUFFIX")) && p[2] && !p[3])
= {
- = o->domain =3D p[2];
- o->dhcp_options |=3D DHCP_OPTIONS_DHCP_OPTIONAL;
+ dhcp->do= main =3D p[2];
}
+ else if (streq(p[1], "DOMAIN-SEARCH"= ;) && p[2] && !p[3])
+ {
+ if (dhcp->domain_search_list_len < N_SEARCH_LIST_L= EN)
+ {
+ dhcp-&= gt;domain_search_list[dhcp->domain_search_list_len++] =3D p[2];+ }
+ else

+ {
+ msg(msglevel, "--dhc= p-option %s: maximum of %d search entries can be specified",+ p[1], N_S= EARCH_LIST_LEN);
+ = }
+ }=
+ else if ((s= treq(p[1], "DNS") || streq(p[1], "DNS6")) && p[= 2] && !p[3]
+= && (!strstr(p[2], ":") || ipv6_addr_safe= (p[2])))
+ {
+ if (strst= r(p[2], ":"))
+ {
+ = dhcp_option_dns6_parse(p[2], dhcp->dns6, &dhcp->dns= 6_len, msglevel);
+ = }
+ = else
+ = {
+ d= hcp_option_address_parse("DNS", p[2], dhcp->dns, &dhcp->= ;dns_len, msglevel);
= + }
+ = }
+#if defined(_WI= N32) || defined(TARGET_ANDROID)
else if (streq(p[1= ], "NBS") && p[2] && !p[3])
= {
o->netbios_scope =3D p[2];
= @@ -8239,23 +8373,9 @@
o->netbios_nod= e_type =3D t;
o->dhcp_options |=3D DHCP_OPT= IONS_DHCP_REQUIRED;
}
- else if ((streq(p[1], "DNS") || = streq(p[1], "DNS6")) && p[2] && !p[3]
<= span style=3D"color: hsl(0, 100%, 40%);">- && (!str= str(p[2], ":") || ipv6_addr_safe(p[2])))

- {
- if (strstr(p[2], ":"))
- {

- dhcp_option_dns6_parse(p[2]= , o->dns6, &o->dns6_len, msglevel);
- }
- else
- {
- o->dhcp_options |=3D DHCP_OPTIONS_DHCP_OPTI= ONAL;
- }
- }
else if (streq(p[1], "WINS") && p[2] &&= ; !p[3])

{
dhcp_optio= n_address_parse("WINS", p[2], o->wins, &o->wins_len, ms= glevel);
- o= ->dhcp_options |=3D DHCP_OPTIONS_DHCP_OPTIONAL;
= }
else if (streq(p[1], "NTP") &&= ; p[2] && !p[3])
{
@@ -826= 7,19 +8387,6 @@
dhcp_option_address_parse(&quo= t;NBDD", p[2], o->nbdd, &o->nbdd_len, msglevel);
<= span> o->dhcp_options |=3D DHCP_OPTIONS_DHCP_REQUIRED;
}
-= else if (streq(p[1], "DOMAIN-SEARCH") && p[2] &am= p;& !p[3])
- = {
- if (o-&= gt;domain_search_list_len < N_SEARCH_LIST_LEN)
- {
- o->domain_search_list[o->domain_s= earch_list_len++] =3D p[2];
- }
- = else
- = {
- = msg(msglevel, "--dhcp-option %s: maximum of %d search entries can be = specified",
- = p[1], N_SEARCH_LIST_LEN);
- }
- o->dhcp_options |=3D DHCP_OPTIONS_DHCP_OPTIONAL;<= /span>
- }
else if (streq(p[1], "DISABLE-NBT") && !p[2]= )

{
o->disable_nbt= =3D 1;
@@ -8297,8 +8404,10 @@
= msg(msglevel, "--dhcp-option: unknown option type '%s' or mis= sing or unknown parameter", p[1]);
goto e= rr;
}
- }
+#else= /* if defined(_WIN32) || defined(TARGET_ANDROID) */
+ setenv_foreign_option(options, (c= onst char **)p, 3, es);
#endif /* if defined(_WIN32) || de= fined(TARGET_ANDROID) */
+ }
#ifdef _WIN32
else if (str= eq(p[0], "show-adapters") && !p[1])
= {

To view, visit change 904. To unsubscribe,= or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I635c4018fb43b5976a39b6a90cb= 2e9cb2570cd6a
Gerrit-Change-Number: 904
Gerrit-PatchSet: 15
Gerrit-Owner: d12fk <heiko@...515...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-Reviewer: stipa <lstipakov@...277...= >
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: stipa <lstipakov@...1663...= .>
Gerrit-MessageType: newpatchset
--h4lXlTzx2sQ=--