[Dnsmasq-discuss] [PATCH] Fix arguments order for chaos subdomain check

jean.thomas at wifirst.fr jean.thomas at wifirst.fr
Wed May 13 11:33:46 UTC 2026


From: Jean Thomas <jean.thomas at wifirst.fr>

The arguments order of hostname_issubdomain() was clarified in
1269f074f86bb959863012063060a3a082d37dc4, but this particular
check of "bind" or "server" subdomain was not modified accordingly,
and this led to forwarding of *.bind and *.server chaos queries.

Signed-off-by: Jean Thomas <jean.thomas at wifirst.fr>
---
 src/rfc1035.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rfc1035.c b/src/rfc1035.c
index 75c79f7..153b6aa 100644
--- a/src/rfc1035.c
+++ b/src/rfc1035.c
@@ -1773,7 +1773,7 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen,
   if (qclass == C_CHAOS)
     {
       /* don't forward *.bind and *.server chaos queries - always reply with NOTIMP */
-      if (hostname_issubdomain("bind", name) || hostname_issubdomain("server", name))
+      if (hostname_issubdomain(name, "bind") || hostname_issubdomain(name, "server"))
 	{
 	  if (!ans)
 	    {
-- 
2.47.3




More information about the Dnsmasq-discuss mailing list