o Small code cleanups in epoll_dispatch().
o Increase the maximum number of addresses read from a packet in evdns to 32.
o Remove support for the rtsig method: it hasn't compiled for a while, and nobody seems to miss it very much. Let us know if there's a good reason to put it back in.
- o Rename the "class" field in evdns_server_request to dns_question_class, so that it won't break compilation under C++. Use a macro so that old code won't break. Mark the macro as deprecated.
\ No newline at end of file
+ o Rename the "class" field in evdns_server_request to dns_question_class, so that it won't break compilation under C++. Use a macro so that old code won't break. Mark the macro as deprecated.
+ o Fix DNS unit tests so that having a DNS server with broken IPv6 support is no longer cause for aborting the unit tests.
+
#include "log.h"
static int dns_ok = 0;
+static int dns_err = 0;
void
dns_gethostbyname_cb(int result, char type, int count, int ttl,
void *addresses, void *arg)
{
- dns_ok = 0;
+ dns_ok = dns_err = 0;
- if (result != DNS_ERR_NONE)
+ if (result == DNS_ERR_TIMEOUT) {
+ fprintf(stdout, "[Timed out] ");
+ dns_err = result;
goto out;
+ }
+
+ if (result != DNS_ERR_NONE) {
+ fprintf(stdout, "[Error code %d] ", result);
+ goto out;
+ }
fprintf(stderr, "type: %d, count: %d, ttl: %d: ", type, count, ttl);
if (dns_ok == DNS_IPv6_AAAA) {
fprintf(stdout, "OK\n");
+ } else if (!dns_ok && dns_err == DNS_ERR_TIMEOUT) {
+ fprintf(stdout, "SKIPPED\n");
} else {
- fprintf(stdout, "FAILED\n");
+ fprintf(stdout, "FAILED (%d)\n", dns_ok);
exit(1);
}
}