patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9721, DNS: Allow a DNS look-up with a...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  Craig McQueen <cmcqueen1975>
Submitted:  Tue 13 Nov 2018 11:37:30 PM UTC
   
 
Category:  DNS Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Jump to the original submission

Thu 22 Nov 2018 12:15:25 PM UTC, comment #7: 

Yes. Pushed, thanks for the patch.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 22 Nov 2018 01:14:44 AM UTC, comment #6: 

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)

Craig McQueen <cmcqueen1975>
Fri 16 Nov 2018 02:18:11 AM UTC, comment #5: 

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

(file #45442)

Craig McQueen <cmcqueen1975>
Thu 15 Nov 2018 10:30:07 AM UTC, comment #4: 


> 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).

Simon Goldschmidt <goldsimon>
Group administrator
Wed 14 Nov 2018 11:57:07 PM UTC, comment #3: 

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?

Craig McQueen <cmcqueen1975>
Wed 14 Nov 2018 07:45:27 PM UTC, comment #2: 

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.

Simon Goldschmidt <goldsimon>
Group administrator
Wed 14 Nov 2018 01:45:49 AM UTC, comment #1: 

See task #14129 regarding DNS domain search list.

Craig McQueen <cmcqueen1975>
Tue 13 Nov 2018 11:37:30 PM UTC, original submission:  

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.

Craig McQueen <cmcqueen1975>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by cmcqueen1975 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-11-22 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2018-11-22 cmcqueen1975 Attached File- Added 0001-DNS-Allow-a-DNS-look-up-with-a-trailing-dot-in-the-n.patch, #45509
    2018-11-16 cmcqueen1975 Attached File- Added 0001-DNS-Allow-a-DNS-look-up-with-a-trailing-dot-in-the-n.patch, #45442
    2018-11-13 cmcqueen1975 Attached File- Added 0001-DNS-Allow-a-DNS-look-up-with-a-trailing-dot-in-the-n.patch, #45420

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code