[patch #9721] DNS: Allow a DNS look-up with a trailing dot in the name

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

[patch #9721] DNS: Allow a DNS look-up with a trailing dot in the name

Jasper Verschueren
URL:
  <https://savannah.nongnu.org/patch/?9721>

                 Summary: DNS: Allow a DNS look-up with a trailing dot in the
name
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: cmcqueen1975
            Submitted on: Tue 13 Nov 2018 11:37:30 PM UTC
                Category: DNS
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

This is not a well-known behaviour of DNS names, but a trailing dot in a
domain name is technically correct to make it a fully-qualified domain name.
I.e. it won't search by appending any DNS search domains.

http://www.dns-sd.org/trailingdotsindomainnames.html

Currently, lwIP doesn't implement any DNS search domain list feature. But
hopefully it may in future.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 13 Nov 2018 11:37:30 PM UTC  Name:
0001-DNS-Allow-a-DNS-look-up-with-a-trailing-dot-in-the-n.patch  Size: 842B  
By: cmcqueen1975

<http://savannah.nongnu.org/patch/download.php?file_id=45420>

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9721>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


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

[patch #9721] DNS: Allow a DNS look-up with a trailing dot in the name

Jasper Verschueren
Follow-up Comment #1, patch #9721 (project lwip):

See task #14129 regarding DNS domain search list.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9721>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


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

[patch #9721] DNS: Allow a DNS look-up with a trailing dot in the name

Jasper Verschueren
Follow-up Comment #2, patch #9721 (project lwip):

Your patch works, but I would prefer to strip the trailing dot a lot earlier.
The goal would be that the trailing dot is only used as an indicator to not
try the search list (once we implement that) and that a cached value matches
for both queries (with or without trailing dot).

This might mean we need to pass 'hostnamelen' to dns_lookup and 'dns_enqueue'.
And once we implement the search list, we need a flag that tells us to search
with the list or not.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9721>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


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

[patch #9721] DNS: Allow a DNS look-up with a trailing dot in the name

Jasper Verschueren
Follow-up Comment #3, patch #9721 (project lwip):

That makes sense.

So the check for trailing dot would be implemented in
dns_gethostbyname_addrtype()?

The one difficulty I see with passing a hostnamelen to dns_lookup() is, that
would affect the call to DNS_LOOKUP_LOCAL_EXTERN(). Either the hostnamelen
would have to be passed to DNS_LOOKUP_LOCAL_EXTERN(), which would change the
API, or else dns_lookup() would need to make a local temporary copy of the
name, with the trailing dot removed. What's the best thing to do?

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9721>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


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

[patch #9721] DNS: Allow a DNS look-up with a trailing dot in the name

Jasper Verschueren
Follow-up Comment #4, patch #9721 (project lwip):

> So the check for trailing dot would be implemented in
dns_gethostbyname_addrtype()?

Yes.

As for DNS_LOOKUP_LOCAL_EXTERN(), I don't think an API change would be too
bad. We do not have local storage for a temporary copy and I wouldn't want to
put it on the stack as it is rather big and somewhat unbound (size controlled
via config option).

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9721>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


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

[patch #9721] DNS: Allow a DNS look-up with a trailing dot in the name

Jasper Verschueren
Follow-up Comment #5, patch #9721 (project lwip):

I'm providing an updated patch. Is this more suitable?

(file #45442)
    _______________________________________________________

Additional Item Attachment:

File name: 0001-DNS-Allow-a-DNS-look-up-with-a-trailing-dot-in-the-n.patch
Size:6 KB


    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9721>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


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

[patch #9721] DNS: Allow a DNS look-up with a trailing dot in the name

Jasper Verschueren
Follow-up Comment #6, patch #9721 (project lwip):

I found an additional change that I should make. I'm adding an updated patch.

However, am I going through the right procedure for updating this patch? Or
should I close this patch submission and create a new patch submission?

(file #45509)
    _______________________________________________________

Additional Item Attachment:

File name: 0001-DNS-Allow-a-DNS-look-up-with-a-trailing-dot-in-the-n.patch
Size:7 KB


    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9721>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


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

[patch #9721] DNS: Allow a DNS look-up with a trailing dot in the name

Jasper Verschueren
Update of patch #9721 (project lwip):

                  Status:                    None => Done                  
             Assigned to:                    None => goldsimon              
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #7:

Yes. Pushed, thanks for the patch.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9721>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


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