-
Notifications
You must be signed in to change notification settings - Fork 294
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
dnsresult: key to lowercase letters #181
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
It seems this change isn't 100% though.
- It would be great to find a reference in the RFC's that indicates it is acceptable to treat a NAPTR replacement field and an SRV key field as case insensitive. RFC2782 indicates clearly that the service and proto parts of the SRV are case insensitive, but it doesn't say this for the Name portion (Page 1 and 2). This seems to indicate that we shouldn't be modifying it to lowercase. Do you see more definitive references to the contrary elsewhere? Really it seems odd that a DNS server would give you a NAPTR record that points to an SRV record and that SRV record is returned in a different case than the server returned in the NAPTR record.
- If we find it's legal to do the case insensitive thing. Line 1341, naptr.replacement is what get's used at the index into the mTopOrderedNAPTRs map (line 1365). We should probably be lowercasing that too. If the DNS server returns mixed case there and we are just lowercasing the SRV result, then it won't match.
- If we find it's legal to do the case insensitive thing. There is a 2nd find call for the mTopOrderedNAPTRs in DnsResult::primeResults, line 673. We should probably lowercase that as well.
Thank you for your quick response, |
|
One more note From the rfc regulations one can see: rfc3403 4.1:
rfc 1035 2.3.3. Character case
I think that means that the entire srv.key can be treated as case insensitive. |
With some routers, the DNS query provides a mixed uppercase and lowercase answer, e.g. for _sip._tcp.tel.t-online.de you get the answer for _sIp._tcp.TeL.t-oNLinE.De
The transport key check then fails.
First and foremost, this can be observed with an IPv6 DNS implementation in the router