-
Michał Kępień authored
Before commit c2ec022f, using the "-b" command line switch for dig did not disable use of the other address family than the one to which the address supplied to that option belonged to. Thus, bind9_getaddresses() could e.g. prepare an isc_sockaddr_t structure for an IPv6 address when an IPv4 address has been passed to the "-b" command line option. To avoid attempting the impossible (e.g. querying an IPv6 address from a socket bound to an IPv4 address), a certain code block in send_tcp_connect() checked whether the address family of the server to be queried was the same as the address family of the socket set up for sending that query; if there was a mismatch, that particular server address was skipped. Commit c2ec022f made bind9_getaddresses() fail upon an address family mismatch between the address the hostname passed to it resolved to and the address supplied to the "-b" command line option. Such failures were fatal to dig back then. Commit 7f658603 made bind9_getaddresses() failures non-fatal, but also ensured that a get_address() failure in send_tcp_connect() still causes the given query address to be skipped (and also made such failures trigger an early return from send_tcp_connect()). Summing up, the code block handling address family mismatches in send_tcp_connect() has been redundant since commit c2ec022f. Remove it.
ef1da873