[Dnsmasq-discuss] MX forwarding

Gene Czarcinski gene at czarc.net
Sat Aug 25 21:23:32 BST 2012


On 08/25/2012 03:07 PM, Gene Czarcinski wrote:
> On 08/24/2012 03:26 PM, Gene Czarcinski wrote:
>> On 08/23/2012 10:26 AM, Gene Czarcinski wrote:
>>> For a query from test2 of "host xxx", the response were:
>>>
>>> query[A]: config xxx.tst is NXDOMAIN-IPv6
>>> query[A]: config xxx is NODATA-IPv4
>>> query[AAAA]: config xxx is NODATA-IPv6
>>> query[MX]: forwarded xxx to 192.168.122.1 <<------------
> In the interest in moving this along, I took a look at the code. 
> Unfortunately, I not quite sure where an actual fix should be done. I 
> did a little "test" and added two lines to extract_request() in 
> rfc1035.c .. I duplicated the T_ANY test and changed ANY to MX.
>
> The result was what I had hoped ... from the syslog:
>   query[MX]: config xxx is NODATA-IPv4
>
> However, as I said in a previous message, I believe that no 
> plain-names should be forwarded is "--domain-needed" is specified ... 
> regardless of what "--local=" is.
>

OK, here is a little patch which seems to make thing work the way I 
believe they should ... that does not make it right or the correct thing 
to do.

Gene

---

--- dnsmasq-2.59/src/forward.c    2011-10-07 10:09:30.000000000 -0400
+++ dnsmasq-2.59/src/forward-new.c    2012-08-25 16:08:40.932797667 -0400
@@ -207,7 +207,8 @@
        }
        }

-  if (flags == 0 && !(qtype & F_QUERY) &&
+//  if (flags == 0 && !(qtype & F_QUERY) &&
+  if (flags == 0 &&
        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;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-domain-name-v2.patch
Type: text/x-patch
Size: 7289 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20120825/f6d974f0/attachment.bin>


More information about the Dnsmasq-discuss mailing list