[Dnsmasq-discuss] MX forwarding
Simon Kelley
simon at thekelleys.org.uk
Thu Aug 30 15:31:00 BST 2012
On 30/08/12 13:11, Gene Czarcinski wrote:
> The patch below has been tested and returns NXDOMAIN for A and AAAA
> plain-name queries (which stops /usr/bin/host) from doing an MX query
> (domain-needed is specified). But a "host -t DS com" and "host -t DS
> org" returns the expected info.
>
> A really simple patch:
> -----------------------------------------------------------------------------------------------------------
>
> diff -uNr dnsmasq-2.59.orig/src/forward.c dnsmasq-2.59/src/forward.c
> --- dnsmasq-2.59.orig/src/forward.c 2011-10-07 10:09:30.000000000 -0400
> +++ dnsmasq-2.59/src/forward.c 2012-08-30 07:27:33.553302341 -0400
> @@ -210,7 +210,7 @@
> if (flags == 0 && !(qtype & F_QUERY) &&
> option_bool(OPT_NODOTS_LOCAL) && !strchr(qdomain, '.') && namelen
> != 0)
> /* don't forward A or AAAA queries for simple names, except the
> empty name */
> - flags = F_NOERR;
> + flags = F_NXDOMAIN;
>
> if (flags == F_NXDOMAIN && check_for_local_domain(qdomain, now))
> flags = F_NOERR;
> --------------------------------------------------------------------------------------------------------------
>
>
But that change returns NXDOMAIN, which is an reversion of one of the
changes made to fix Debian bug 630637.
I'm happy to add MX to A and AAAA records for special-casing, but not
the above patch.
Simon.
More information about the Dnsmasq-discuss
mailing list