DNS look-up with domain search

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

DNS look-up with domain search

Craig McQueen
I'm interested in doing DNS look-ups that possibly include a domain search list.

I'm successfully using LWIP_HOOK_DHCP_APPEND_OPTIONS() and LWIP_HOOK_DHCP_PARSE_OPTION() to get a domain from DHCP via DHCP option 15.

Now I'm interested in possibly using that as a search domain. So if doing a look-up for "server", and DHCP option 15 specifies domain "example.com", then DNS could do a search for "server.example.com". But not if the original look-up name includes a trailing dot. If the original name includes a trailing dot, e.g. "server.com.", then it wouldn't try "server.com.example.com".

Note that the current functions in dns.c will fail a DNS look-up given a string that ends with a trailing dot. Technically is this correct or incorrect? See the following which discusses trailing dots in domain names:
http://www.dns-sd.org/trailingdotsindomainnames.html

--
Craig McQueen


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: DNS look-up with domain search

goldsimon@gmx.de
On 12.11.2018 00:26, Craig McQueen wrote:
> I'm interested in doing DNS look-ups that possibly include a domain search list.

I'm interested in that, too, but haven't found the time yet. There's
task #14129 ("DNS: implement domain search list (e.g. filled via DHCP)")
to remind us...

> I'm successfully using LWIP_HOOK_DHCP_APPEND_OPTIONS() and LWIP_HOOK_DHCP_PARSE_OPTION() to get a domain from DHCP via DHCP option 15.
>
> Now I'm interested in possibly using that as a search domain. So if doing a look-up for "server", and DHCP option 15 specifies domain "example.com", then DNS could do a search for "server.example.com". But not if the original look-up name includes a trailing dot. If the original name includes a trailing dot, e.g. "server.com.", then it wouldn't try "server.com.example.com".
>
> Note that the current functions in dns.c will fail a DNS look-up given a string that ends with a trailing dot. Technically is this correct or incorrect? See the following which discusses trailing dots in domain names:
> http://www.dns-sd.org/trailingdotsindomainnames.html

Looks like we are missing this dot at the end. Noone has complained
until now, but when implementing search lists, we probably should care
for the dot at the end...

Simon

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users