Skip to content

Commit

Permalink
fix AAAA record replies
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed May 25, 2012
1 parent e80fcd0 commit ff1515d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dns.c
Expand Up @@ -302,9 +302,9 @@ ssize_t static dnshandle(dns_opt_t *opt, const unsigned char *inbuf, size_t insi
int n = 0;
while (n < naddr) {
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]);
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]);
// printf("wrote A record: %i\n", ret);
if (!ret) {
Expand Down
1 change: 1 addition & 0 deletions main.cpp
Expand Up @@ -220,6 +220,7 @@ extern "C" int GetIPList(void *data, addr_t* addr, int max, int ipv4, int ipv6)
addr[i] = thread->cache[j];
thread->cache[j] = thread->cache[i];
thread->cache[i] = addr[i];
i++;
}
return max;
}
Expand Down

0 comments on commit ff1515d

Please sign in to comment.