References: <523527018.2514117.1583041035054@...2084...> <20200301071521.GI1431@...1296...> <20200621111403.GP1431@...1296...> <20200624102804.GM1431@...1296...> <50ad64e7-b75c-e40b-5d5e-9e89e90db45d@...1147...> <20200630141103.GY1431@...1296...> From: Jan Just Keijser Message-ID: <67f23584-07bd-7f0a-de1d-6ac285342e46@...1147...> Date: Tue, 30 Jun 2020 16:15:58 +0200 MIME-Version: 1.0 In-Reply-To: <20200630141103.GY1431@...1296...> Content-Type: multipart/alternative; boundary="------------6FCBEF9D16625321F6DD870B" Content-Language: nl-NL Subject: Re: [Openvpn-devel] [Openvpn-users] Multiple DNS search suffixes on Windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gert Doering Cc: "openvpn-devel@lists.sourceforge.net" This is a multi-part message in MIME format. --------------6FCBEF9D16625321F6DD870B Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit hi, On 30/06/20 16:11, Gert Doering wrote: > Hi, > > On Tue, Jun 30, 2020 at 04:07:52PM +0200, Jan Just Keijser wrote: >> @@ -5697,6 +5740,11 @@ build_dhcp_options_string(struct buffer *buf, const struct tuntap_options *o) >> write_dhcp_u32_array(buf, 42, (uint32_t *)o->ntp, o->ntp_len, &error); >> write_dhcp_u32_array(buf, 45, (uint32_t *)o->nbdd, o->nbdd_len, &error); >> >> + for (int i=0; i < o->domain_search_list_len; i++) >> + { >> + write_dhcp_search_str(buf, 119, o->domain_search_list[i], &error); >> + } > I assume that this won't work. In the DHCP answer, it must be a single > option with the concatenated list, not multiple answers with a single > domain name each. > > gert > see https://tools.ietf.org/html/rfc3397 " In the above diagram, Searchstring is a string specifying the searchlist. If the length of the searchlist exceeds the maximum permissible within a single option (255 octets), then multiple options MAY be used, as described in "Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4)" [RFC3396 ]. " so you MAY use this option multiple times - and wireshark groks it fine. I don't have a Windows 10 client to test it against, however, so I am hoping that someone (Selva?) can do that for me. cheers, JJK --------------6FCBEF9D16625321F6DD870B Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 7bit
hi,

On 30/06/20 16:11, Gert Doering wrote:
Hi,

On Tue, Jun 30, 2020 at 04:07:52PM +0200, Jan Just Keijser wrote:
@@ -5697,6 +5740,11 @@ build_dhcp_options_string(struct buffer *buf, const struct tuntap_options *o)
     write_dhcp_u32_array(buf, 42, (uint32_t *)o->ntp, o->ntp_len, &error);
     write_dhcp_u32_array(buf, 45, (uint32_t *)o->nbdd, o->nbdd_len, &error);
 
+    for (int i=0; i < o->domain_search_list_len; i++)
+    {
+        write_dhcp_search_str(buf, 119, o->domain_search_list[i], &error);
+    }
I assume that this won't work.  In the DHCP answer, it must be a single 
option with the concatenated list, not multiple answers with a single 
domain name each.

gert

see https://tools.ietf.org/html/rfc3397

"
   In the above diagram, Searchstring is a string specifying the
   searchlist.  If the length of the searchlist exceeds the maximum
   permissible within a single option (255 octets), then multiple
   options MAY be used, as described in "Encoding Long Options in the
   Dynamic Host Configuration Protocol (DHCPv4)" [RFC3396].

"


so you MAY use this option multiple times - and wireshark groks it fine. I don't have a Windows 10 
client to test it against, however, so I am hoping that someone (Selva?) can do that for me.

cheers,

JJK

--------------6FCBEF9D16625321F6DD870B--