From d57468228028c8acd058b8ebc7da7d5ea0b574b9 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 26 May 2026 13:18:33 +0000 Subject: Only test Z answer bits if S6DNS_O_STRICT --- src/libs6dns/s6dns_engine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs6dns/s6dns_engine.c b/src/libs6dns/s6dns_engine.c index 86240b7..85d83a2 100644 --- a/src/libs6dns/s6dns_engine.c +++ b/src/libs6dns/s6dns_engine.c @@ -39,8 +39,8 @@ static int relevant (char const *q, unsigned int qlen, char const *ans, unsigned s6dns_message_header_t h ; uint16_t id ; s6dns_message_header_unpack(ans, &h) ; - if (!h.qr || h.opcode || h.z || (h.counts.qd != 1)) return 0 ; - if (strict && ((!h.aa && !(q[2] & 1)) || h.rd != (q[2] & 1))) return 0 ; + if (!h.qr || h.opcode || (h.counts.qd != 1)) return 0 ; + if (strict && (h.z || (!h.aa && !(q[2] & 1)) || h.rd != (q[2] & 1))) return 0 ; uint16_unpack_big(q, &id) ; if (id != h.id) return 0 ; } -- cgit v1.3.1