summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libs6dns/s6dns_engine.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libs6dns/s6dns_engine.c b/src/libs6dns/s6dns_engine.c
index 8c99194..4d61e78 100644
--- a/src/libs6dns/s6dns_engine.c
+++ b/src/libs6dns/s6dns_engine.c
@@ -36,8 +36,7 @@ static int relevant (char const *q, unsigned int qlen, char const *ans, unsigned
uint16_t id ;
s6dns_message_header_unpack(ans, &h) ;
if (!h.qr || h.opcode || h.z || (h.counts.qd != 1)) return 0 ;
- if (h.rd != (q[2] & 1)) return 0 ;
- if (strict && !h.aa && !(q[2] & 1)) return 0 ;
+ if (strict && ((!h.aa && !(q[2] & 1)) || h.rd != (q[2] & 1))) return 0 ;
uint16_unpack_big(q, &id) ;
if (id != h.id) return 0 ;
}