diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-05-26 13:18:33 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-05-26 13:18:33 +0000 |
| commit | d57468228028c8acd058b8ebc7da7d5ea0b574b9 (patch) | |
| tree | 3a561f8e273f30a46a8b2352dffe6f74f4ee4439 | |
| parent | b4341d53a70ea799305065101829bcb918685b61 (diff) | |
| download | s6-dns-d57468228028c8acd058b8ebc7da7d5ea0b574b9.tar.gz | |
Only test Z answer bits if S6DNS_O_STRICT
| -rw-r--r-- | src/libs6dns/s6dns_engine.c | 4 |
1 files 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 ; } |
