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

Simon Kelley simon at thekelleys.org.uk
Mon Jun 1 13:52:16 UTC 2026


I scratched my head on this for a while. Turns out the 
1269f074f86bb959863012063060a3a082d37dc4 changes were just wrong, I 
clearly didn't scratch my head for long enough when I made them.

https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=754177b36803628cf6999c0cfd0b9c424c76281b

should put everything right.

Simon.

On 13.05.2026 12:33, Jean Thomas via Dnsmasq-discuss wrote:
> 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)
>   	    {




More information about the Dnsmasq-discuss mailing list