Differences From Artifact [96d7da671e]:
- File
src/OFHostAddressResolver.m
— part of check-in
[355da9743c]
at
2019-10-20 00:57:14
on branch trunk
— OFDNSResolver: Try all search domains
This functionality was temporarily removed by the refactor. (user: js, size: 9351) [annotate] [blame] [check-ins using]
To Artifact [90c9bb13be]:
- File src/OFHostAddressResolver.m — part of check-in [7fa337b8a4] at 2019-10-20 01:13:36 on branch trunk — Rename of_dns{_resource -> }_record_type_t (user: js, size: 9306) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
69 70 71 72 73 74 75 | static bool addressForRecord(OF_KINDOF(OFDNSResourceRecord *) record, const of_socket_address_t **address, of_socket_address_family_t addressFamily) { switch ([record recordType]) { #ifdef OF_HAVE_IPV6 | | | | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | static bool addressForRecord(OF_KINDOF(OFDNSResourceRecord *) record, const of_socket_address_t **address, of_socket_address_family_t addressFamily) { switch ([record recordType]) { #ifdef OF_HAVE_IPV6 case OF_DNS_RECORD_TYPE_AAAA: if (addressFamily != OF_SOCKET_ADDRESS_FAMILY_IPV6 && addressFamily != OF_SOCKET_ADDRESS_FAMILY_ANY) return false; break; #endif case OF_DNS_RECORD_TYPE_A: if (addressFamily != OF_SOCKET_ADDRESS_FAMILY_IPV4 && addressFamily != OF_SOCKET_ADDRESS_FAMILY_ANY) return false; break; default: return false; } |
︙ | ︙ | |||
166 167 168 169 170 171 172 | #ifdef OF_HAVE_IPV6 if (_addressFamily == OF_SOCKET_ADDRESS_FAMILY_IPV6 || _addressFamily == OF_SOCKET_ADDRESS_FAMILY_ANY) { OFDNSQuery *query = [OFDNSQuery queryWithDomainName: domainName DNSClass: OF_DNS_CLASS_IN | | | | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | #ifdef OF_HAVE_IPV6 if (_addressFamily == OF_SOCKET_ADDRESS_FAMILY_IPV6 || _addressFamily == OF_SOCKET_ADDRESS_FAMILY_ANY) { OFDNSQuery *query = [OFDNSQuery queryWithDomainName: domainName DNSClass: OF_DNS_CLASS_IN recordType: OF_DNS_RECORD_TYPE_AAAA]; _numExpectedResponses++; [_resolver asyncPerformQuery: query runLoopMode: _runLoopMode delegate: self]; } #endif if (_addressFamily == OF_SOCKET_ADDRESS_FAMILY_IPV4 || _addressFamily == OF_SOCKET_ADDRESS_FAMILY_ANY) { OFDNSQuery *query = [OFDNSQuery queryWithDomainName: domainName DNSClass: OF_DNS_CLASS_IN recordType: OF_DNS_RECORD_TYPE_A]; _numExpectedResponses++; [_resolver asyncPerformQuery: query runLoopMode: _runLoopMode delegate: self]; } } |
︙ | ︙ | |||
216 217 218 219 220 221 222 | continue; if (addressForRecord(record, &address, _addressFamily)) { [_addresses addItem: address]; continue; } | | | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | continue; if (addressForRecord(record, &address, _addressFamily)) { [_addresses addItem: address]; continue; } if ([record recordType] != OF_DNS_RECORD_TYPE_CNAME) continue; /* FIXME: Check if it's already in answers */ CNAMEQuery = [OFDNSQuery queryWithDomainName: [record alias] DNSClass: OF_DNS_CLASS_IN recordType: query.recordType]; _numExpectedResponses++; |
︙ | ︙ |