From 2a9fdae5f4cc7c97582c657dba605cbf4084ad98 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 13 Oct 2024 07:58:16 +0200 Subject: [PATCH] dns/client: return ENOTSUP if no server or not getaddrinfo (#1196) --- src/dns/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dns/client.c b/src/dns/client.c index 7ebd109f6..636085ea6 100644 --- a/src/dns/client.c +++ b/src/dns/client.c @@ -984,7 +984,7 @@ static int query(struct dns_query **qp, struct dnsc *dnsc, uint8_t opcode, (type == DNS_TYPE_A || type == DNS_TYPE_AAAA); if (!srv_available && !use_getaddrinfo) - return EINVAL; + return ENOTSUP; if (DNS_QTYPE_AXFR == type) proto = IPPROTO_TCP;