We set the answer count in host byte order instead of network
byte order when sending cached AAAA record. This problem is only
seen in special case when an AAAA record is generated by us when
there is IPv4 address in cache but no IPv6 address for the host.
return -ENOMEM;
data->inserted = entry->ipv4->inserted;
data->type = type;
- data->answers = hdr->ancount;
+ data->answers = ntohs(hdr->ancount);
data->timeout = entry->ipv4->timeout;
if (srv->protocol == IPPROTO_UDP)
cache_offset = 2;