Hi all,

On 08-Jul-20 10:24, Gert Doering wrote:
On Tue, Jul 07, 2020 at 06:14:25PM +0200, Jan Just Keijser wrote:
This one works(!), so generally, Win10 accepts this DHCP option - but
it seems to want "all domains in one".

Can you send a v3?

not sure if all went well , but here's V3.
Unfortunately not, that one seems to be based on your V1 patch, so
we have "remove 'SEARCH', add 'DOMAIN-SEARCH'" hunks...

diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index e59b22b..85f1d8a 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -726,7 +726,7 @@ static const char usage_message[] =
      "                    which allow multiple addresses,\n"
      "                    --dhcp-option must be repeated.\n"
      "                    DOMAIN name : Set DNS suffix\n"
-    "                    SEARCH name : Set DNS domain search list\n"
+    "                    DOMAIN-SEARCH entry : Add entry to DNS domain search 
list\n"
This is ok for me to have a look, but to actually merge I need something
that applies "as it is" on top of master...

diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index eed9ae6..60a149c 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -5567,46 +5567,70 @@ write_dhcp_str(struct buffer *buf, const int type, 
const char *str, bool *error)
      buf_write(buf, str, len);
  }
+/*
+ * RFC3397 states that multiple searchdomains are encoded as follows:
+ *  - at start the length of the entire option is given
+ *  - each subdomain is preceded by its length
+ *  - each searchdomain is separated by a NUL character
+ * e.g. if you want "openvpn.net" and "duckduckgo.com" then you end up with
+ *  0x13  0x7 openvpn 0x3 net 0x00 0x0A duckduckgo 0x3 com 0x00
+ */
Richard commented on IRC that the "0x13" does not seem to be right here
- adding up all of it (1+7+1+3+1+1+10+1+3+1 = 29).  Can you double-check?

It's just a comment, but if that is wrong, it's not helpful in trying to
understand the code.


just submitted patch v4 but forgot to fix that:   richard is right 29 decimal is  0x1D -  or just 29, I guess  - not 0x13

Want a v5 for that :P ?

cheers,

JJK



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to