One issue is that I need to check the code that validates a reply from the remote server. Right now the query ID and port number are validated; I need to make sure the code always validates the name requested also. This code will be put in get_remote_udp_packet() in DwUdpSocket.c.
I will need to reorganize this function a little; we will get the query from the question section of the reply and make sure it's the same before checking for truncation or what not.
I would like to thank "neeo" for pointing out this issue.
Once I do all that, I want to work on the "Google problem". To make the code as simple as possible, I will code things thusly:
- I will only look past the first reply if it's a CNAME reply and if there is more than one answer in the answer section.
- As long as the DNS reply is a CNAME, and there are still answers in the answer section, we go until the first non-CNAME packet, or when we run out of answers in the answer section.
- We keep a record of the lowest TTL we've seen in a packet. This is the TTL we will use to store the record