d497d7e4a7
We found that the libraries behaviour when dealing with domains with more than one entry in them is slightly suboptimal. The situation was kdc1 IN A 1.2.3.4 kdc1 IN AAAA ff02::1 I.e. a single hostmame with both IPv6 and IPv4 addresses. When we run krb5_sendto_kdc on a box with only IPv4 addresses, there is a 3s delay before it fails back to the IPv4 address. This is because the library sets the 2nd address on each hostname to be 3s in the future and each additional one another 3s. We change wait_response() s.t. if one is able to make progress, we iterate over the list of hosts and move them all 1s forward. We also modify submit_request() to skip hosts if host_connect() fails.