-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FNET DNS doesn't resolve for certain urls #7
Comments
I suggest to update to the latest version of FNET, where done many DNS-related changes. |
Thanks for your reply, |
I do not have the Eth boards at home-ofice now. |
I could track down the error to occur in the method I found out that if I returned with result = FNET_TRUE irrespectively of the tests done in this method everything worked fine.
I included some additional debug statements into the code
static fnet_bool_t _fnet_dns_cmp_name(const char *rr_name, const char *name)
} and got the following output (NTP request before trying to access the Azure Storage Table) pool.ntp.org UPDATED Table is availabel Setting It seems that the method has problems with the CNAME entry in the dns response |
So the third DNS server response contains unexpected CNAME (first 2 are ok). |
I don't know, I'm not an expert in this matter. I could imagine that all domains using CNAME records are affected, so the problem should be solved. |
Hello, I had a deeper look in the code and found a sequence which might cause the issue. It's in the file: Line 430 induces a first check if the name in the response is equal to the host-name Line 430: if(ptr && (_fnet_dns_cmp_name(rr_name, dns_if->host_name) == FNET_TRUE)) /* Check question name */ Then the ptr is incremented so much that now rr_name points to (in my case) the CName, an alias name for the primary url. L445: if(_fnet_dns_cmp_name(rr_name, dns_if->host_name) == FNET_TRUE) PS: I'm not at home for the next couple of days, so I cannot answer, |
The behavior is correct, as we should return rr-records we have requested. But if you will find a non correspondence with a RFC, please inform us. |
Hi butok, thanks for your answer. |
Hi @butok, |
Yes, please open a discussion. |
@RoSchmi Hi, I have the same issue using NativeEthernet on Teensy 4.1, which uses FNET underneath to resolve hostnames. In my case, the host is "api.weather.gov", which FNET fails to resolve. It is an alias record but NSLOOKUP on a PC and other DNS lookup services, browsers, etc. resolve this correctly. |
For a DNS inquiry when the submitted hostname is actually a CNAME, the DNS server should return both the CNAME record and the corresponding A record the CNAME aliases. In this situation, the host name on the A record will obviously not match the initial inquiry, but this is the actual IP that is to be returned from the inquiry. |
@egonbeermat Thanks for your help. The code on line 430 induces a test wheter the requested hostname is equal to the requested name returned in the rr-record. |
The issue seems to be solved here: |
Thank you, |
Board: Teensy 4.1 with NativeEthernet library
https://github.com/vjmuzik/NativeEthernet
I'm using this fork of the FNET repository:
https://github.com/vjmuzik/FNET
As far as I could see the concerning service 'fnet_dns.c' doesn't differ between the forks.
The dns service resolves fine for different urls, but not for the one which I use to access my Azure Storage Tables:
'prax47.table.core.windows.net'
This url is resolved without issues on different mcus and frameworks, e.g. Wio Terminal with WiFi library or 'EthernetENC' library.
Wireshark captures show this dns request
and this response
As I interpret the captures FNET dns service regulary sends the request but doesn't accept the response, complaining about malformed packets.
What could be the reason for this behavior?
The text was updated successfully, but these errors were encountered: