summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-query.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve/resolved-dns-query.c')
-rw-r--r--src/resolve/resolved-dns-query.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/resolve/resolved-dns-query.c b/src/resolve/resolved-dns-query.c
index a9880524e6..dd812150cf 100644
--- a/src/resolve/resolved-dns-query.c
+++ b/src/resolve/resolved-dns-query.c
@@ -107,12 +107,9 @@ int dns_query_transaction_reply(DnsQueryTransaction *t, DnsPacket *p) {
t->packet = dns_packet_ref(p);
- if (DNS_PACKET_RCODE(p) == DNS_RCODE_SUCCESS) {
- if( be16toh(DNS_PACKET_HEADER(p)->ancount) > 0)
- dns_query_transaction_set_state(t, DNS_QUERY_SUCCESS);
- else
- dns_query_transaction_set_state(t, DNS_QUERY_INVALID_REPLY);
- } else
+ if (DNS_PACKET_RCODE(p) == DNS_RCODE_SUCCESS)
+ dns_query_transaction_set_state(t, DNS_QUERY_SUCCESS);
+ else
dns_query_transaction_set_state(t, DNS_QUERY_FAILURE);
return 0;