[Dnsmasq-discuss] MX forwarding

Gene Czarcinski gene at czarc.net
Thu Aug 30 13:11:18 BST 2012


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;
--------------------------------------------------------------------------------------------------------------

Gene



More information about the Dnsmasq-discuss mailing list