Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dns-domain: tweak hash table comparison function for DNS names
Currently, when comparing two DNS names when storing them in a hashtable, and the DNS names are not actually valid we'll compare the error codes. This is not very smart however, since this means two invalid DNS names that happen to be equally "invalid" will be considered identical, even if their strings are entirely different. Let's find a better solution for this niche case: let's simple compare the domains as strings. This matters in case of DNS label compression: if we already added added an invalid DNS name into the label compression hash table, and lookup any other invalid DNS name, this lookup will likely return what the earlier one already returned, and that's confusing. (cherry picked from commit 8ed2c62)
- Loading branch information