summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dnsproxy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index ce619095..f698cfde 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -1307,7 +1307,7 @@ static int cache_update(struct server_data *srv, unsigned char *msg,
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;