-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbind-fallback-to-second-server.diff
67 lines (65 loc) · 2.78 KB
/
bind-fallback-to-second-server.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
diff -up bind-9.17.20/bin/dig/dighost.c.fallback-to-second-server.droplet bind-9.17.20/bin/dig/dighost.c
--- bind-9.17.20/bin/dig/dighost.c.fallback-to-second-server.droplet 2021-12-03 19:40:55.063305748 +0100
+++ bind-9.17.20/bin/dig/dighost.c 2021-12-03 19:41:30.215402219 +0100
@@ -610,7 +610,7 @@ make_empty_lookup(void) {
.rdtype = dns_rdatatype_a,
.qrdtype = dns_rdatatype_a,
.rdclass = dns_rdataclass_in,
- .servfail_stops = true,
+ .servfail_stops = false,
.besteffort = true,
.opcode = dns_opcode_query,
.badcookie = true,
diff -up bind-9.17.20/bin/dig/host.c.fallback-to-second-server.droplet bind-9.17.20/bin/dig/host.c
--- bind-9.17.20/bin/dig/host.c.fallback-to-second-server.droplet 2021-11-05 08:13:41.058614455 +0100
+++ bind-9.17.20/bin/dig/host.c 2021-12-03 19:40:55.063305748 +0100
@@ -114,6 +114,7 @@ show_usage(void) {
" -c specifies query class for non-IN data\n"
" -C compares SOA records on authoritative nameservers\n"
" -d is equivalent to -v\n"
+ " -F Don't use next server if the first one got a SERVFAIL\n"
" -l lists all hosts in a domain, using AXFR\n"
" -m set memory debugging flag (trace|record|usage)\n"
" -N changes the number of dots allowed before root "
@@ -638,6 +639,8 @@ pre_parse_args(int argc, char **argv) {
break;
case 'i':
break;
+ case 'F':
+ break;
case 'l':
break;
case 'n':
@@ -699,6 +702,9 @@ parse_args(bool is_batchfile, int argc,
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
switch (c) {
+ case 'F':
+ lookup->servfail_stops = true;
+ break;
case 'l':
lookup->tcp_mode = true;
lookup->rdtype = dns_rdatatype_axfr;
diff -up bind-9.17.20/bin/dig/nslookup.c.fallback-to-second-server.droplet bind-9.17.20/bin/dig/nslookup.c
--- bind-9.17.20/bin/dig/nslookup.c.fallback-to-second-server.droplet 2021-11-05 08:13:41.058614455 +0100
+++ bind-9.17.20/bin/dig/nslookup.c 2021-12-03 19:40:55.063305748 +0100
@@ -43,7 +43,7 @@ static bool short_form = true, tcpmode =
identify = false, stats = true, comments = true,
section_question = true, section_answer = true,
section_authority = true, section_additional = true, recurse = true,
- aaonly = false, nofail = true, default_lookups = true,
+ aaonly = false, nofail = true, fail = false, default_lookups = true,
a_noanswer = false;
static bool interactive;
@@ -714,9 +714,10 @@ setoption(char *opt) {
usesearch = false;
} else if (CHECKOPT("sil", 3)) {
/* deprecation_msg = false; */
- } else if (CHECKOPT("fail", 3)) {
+ } else if (CHECKOPT("fail", 4)) {
+ fail = true;
nofail = false;
- } else if (CHECKOPT("nofail", 5)) {
+ } else if (CHECKOPT("nofail", 6)) {
nofail = true;
} else if (strncasecmp(opt, "ndots=", 6) == 0) {
set_ndots(&opt[6]);