File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / dnsmasq / contrib / try-all-ns / dnsmasq-2.47_no_nxdomain_until_end.patch
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 29 19:37:40 2013 UTC (11 years, 3 months ago) by misho
Branches: elwix, dnsmasq, MAIN
CVS tags: v8_2p1, v2_84, v2_76p1, v2_71, v2_66p0, v2_66, HEAD
dnsmasq

diff -ur dnsmasq-2.47/src/forward.c dnsmasq-2.47-patched/src/forward.c
--- dnsmasq-2.47/src/forward.c	2009-02-01 17:59:48.000000000 +0200
+++ dnsmasq-2.47-patched/src/forward.c	2009-03-18 19:10:22.000000000 +0200
@@ -488,9 +488,12 @@
     return;
    
   server = forward->sentto;
+
+  if ( (header->rcode == NXDOMAIN) && ((daemon->options & OPT_ORDER) != 0) && (server->next != NULL) )
+    header->rcode = SERVFAIL;
   
   if ((header->rcode == SERVFAIL || header->rcode == REFUSED) &&
-      !(daemon->options & OPT_ORDER) &&
+      ((daemon->options & OPT_ORDER) != 0) &&
       forward->forwardall == 0)
     /* for broken servers, attempt to send to another one. */
     {

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>