summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Glick <jglick@cloudbees.com>2014-02-04 20:20:35 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2014-02-04 20:20:35 +0000
commitfd372273bde910735f6117461f070fe8b250158b (patch)
tree4a62e2c4088297c10d796de2881996c7d7a5da68
parentb98d22c19151de486fcd23ea701456395dae776e (diff)
downloaddnsmasq-fd372273bde910735f6117461f070fe8b250158b.tar.gz
Updated version of contrib/try-all-nsv2.69test6
-rw-r--r--contrib/try-all-ns/dnsmasq-2.68-try-all-ns29
1 files changed, 29 insertions, 0 deletions
diff --git a/contrib/try-all-ns/dnsmasq-2.68-try-all-ns b/contrib/try-all-ns/dnsmasq-2.68-try-all-ns
new file mode 100644
index 0000000..66a41f6
--- /dev/null
+++ b/contrib/try-all-ns/dnsmasq-2.68-try-all-ns
@@ -0,0 +1,29 @@
+From: Jesse Glick <jglick@cloudbees.com>
+To: dnsmasq-discuss@lists.thekelleys.org.uk
+Subject: Re: [Dnsmasq-discuss] Ability to delegate to one server but fall
+ back to another after NXDOMAIN?
+
+
+On Wed, Jan 15, 2014 at 12:30 PM, Simon Kelley <simon@thekelleys.org.uk> wrote:
+> > There's a (very old) patch in contrib/try-all-ns that would make a starting point
+This does not apply against trunk, so I tried to rework it. The
+following appears to do what I expect:
+
+diff --git a/src/forward.c b/src/forward.c
+index 8167229..76070b5 100644
+--- a/src/forward.c
++++ b/src/forward.c
+@@ -610,7 +610,11 @@ void reply_query(int fd, int family, time_t now)
+
+ if ((RCODE(header) == SERVFAIL || RCODE(header) == REFUSED) &&
+ !option_bool(OPT_ORDER) &&
+- forward->forwardall == 0)
++ forward->forwardall == 0 ||
++ /* try each in turn */
++ RCODE(header) == NXDOMAIN &&
++ option_bool(OPT_ORDER) &&
++ server->next != NULL)
+ /* for broken servers, attempt to send to another one. */
+ {
+ unsigned char *pheader;
+