Browse Source

fix AAAA record replies

pull/1/head
Pieter Wuille 13 years ago
parent
commit
ff1515d9fe
  1. 4
      dns.c
  2. 1
      main.cpp

4
dns.c

@ -302,9 +302,9 @@ ssize_t static dnshandle(dns_opt_t *opt, const unsigned char *inbuf, size_t insi
int n = 0; int n = 0;
while (n < naddr) { while (n < naddr) {
int ret = 1; int ret = 1;
if (addr->v == 4) if (addr[n].v == 4)
ret = write_record_a(&outpos, outend - auth_size, "", offset, CLASS_IN, opt->datattl, &addr[n]); ret = write_record_a(&outpos, outend - auth_size, "", offset, CLASS_IN, opt->datattl, &addr[n]);
else if (addr->v == 6) else if (addr[n].v == 6)
ret = write_record_aaaa(&outpos, outend - auth_size, "", offset, CLASS_IN, opt->datattl, &addr[n]); ret = write_record_aaaa(&outpos, outend - auth_size, "", offset, CLASS_IN, opt->datattl, &addr[n]);
// printf("wrote A record: %i\n", ret); // printf("wrote A record: %i\n", ret);
if (!ret) { if (!ret) {

1
main.cpp

@ -220,6 +220,7 @@ extern "C" int GetIPList(void *data, addr_t* addr, int max, int ipv4, int ipv6)
addr[i] = thread->cache[j]; addr[i] = thread->cache[j];
thread->cache[j] = thread->cache[i]; thread->cache[j] = thread->cache[i];
thread->cache[i] = addr[i]; thread->cache[i] = addr[i];
i++;
} }
return max; return max;
} }

Loading…
Cancel
Save