diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-02-03 06:21:09 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-02-03 06:21:09 +0000 |
| commit | fb572d1b82793c743dd19a05d87c3cfc30aa50d2 (patch) | |
| tree | debd96bcd5dde6453ce03ca1a9f78c5624e2934f | |
| parent | baaddb22b8a8e0fc071759d2f9b6280b7aa8f3d8 (diff) | |
| download | s6-dns-fb572d1b82793c743dd19a05d87c3cfc30aa50d2.tar.gz | |
Fix dotpc; allow dummy s6dns_engine queries with qtype = 0
| -rw-r--r-- | Makefile | 1 | ||||
| -rw-r--r-- | src/libs6dns/s6dns_engine.c | 1 |
2 files changed, 2 insertions, 0 deletions
@@ -42,6 +42,7 @@ endif lib$(2).pc: exec env \ + prefix="$(prefix)" \ library="$(2)" \ includedir="$(includedir)" \ dynlibdir="$(dynlibdir)" \ diff --git a/src/libs6dns/s6dns_engine.c b/src/libs6dns/s6dns_engine.c index 9477a2c..86240b7 100644 --- a/src/libs6dns/s6dns_engine.c +++ b/src/libs6dns/s6dns_engine.c @@ -346,6 +346,7 @@ int s6dns_engine_event (s6dns_engine_t *dt, tain const *stamp) int s6dns_engine_init_r (s6dns_engine_t *dt, s6dns_ip46list_t const *servers, uint32_t options, char const *q, unsigned int qlen, uint16_t qtype, s6dns_debughook_t const *dbh, tain const *deadline, tain const *stamp) { s6dns_message_header_t h = S6DNS_MESSAGE_HEADER_ZERO ; + if (!qtype) { dt->status = EINVAL ; return 1 ; } if (!stralloc_ready(&dt->sa, qlen + 18)) return 0 ; dt->deadline = *deadline ; dt->localdeadline = *stamp ; |
