1
--- maradns-1.3.07.06/server/udpsuccess.c 2007-10-19 08:52:20.000000000 -0500
2
+++ maradns-1.3.07.07/server/udpsuccess.c 2007-10-25 07:49:33.000000000 -0500
5
extern rr *seenlist[256];
6
extern int seenlist_where;
8
extern ipv4pair long_packet[512];
10
/* If we successfully found a record, spit out that record on the
16
+ header.rd = rd_val; /* RDBUG udpsuccess */
19
header.rcode = 0; /* No error */
23
udperror(sock,most,client,0,SERVER_FAIL,"giveerror in udpsuccess",2,
28
/* Clean up the seenlist_where list */
29
--- maradns-1.3.07.06/server/MaraDNS.c 2007-10-19 08:52:20.000000000 -0500
30
+++ maradns-1.3.07.07/server/MaraDNS.c 2007-10-25 07:53:01.000000000 -0500
33
rr *ra_data = 0; /* Bogus SOA to give out whenever a SOA request is sent */
35
-int rd_value = 0; /* Whether RD is set to 0 or 1 in replies to
36
- authoritative queries */
37
+/*int rd_value = 0;*/ /* Whether RD is set to 0 or 1 in replies to
38
+ authoritative queries; disabled because you
39
+ shouldn't use global variables in threaded
42
int dos_protection_level = 0; /* How many features of MaraDNS we're willing
43
to give up to make her more immune to
45
header.aa = 0; /* Errors are never authoritative (unless they are
46
NXDOMAINS, which this is not) */
49
+ header.rd = rd_val; /* RDBUG udperror */
55
/* Make the header a placeholder for now */
58
+ header.rd = rd_val; /* RDBUG udpany */
59
if(make_hdr(&header,most) == JS_ERROR)
67
+ header.rd = rd_val; /* RDBUG udpany */
69
header.aa = authoritative; /* Currently always 1 */
74
udperror(sock,most,client,0,SERVER_FAIL,"compression failure",2,
83
udperror(sock,most,client,0,SERVER_FAIL,"giveerror in udpany",2,
88
/* Clean up the seenlist_where list
90
header.opcode = 0; /* Normal DNS */
91
header.aa = 0; /* DDIP to A translations are never authoritative */
92
header.tc = 0; /* A labels are too short to be truncated */
93
- header.rd = 0; /* Recursion not desired */
94
+ header.rd = 0; /* Recursion not desired */ /* RDBUG easter egg */
95
header.ra = 0; /* Recursion not available */
96
header.z = 0; /* This must be 0 unless we are EDNS aware (we aren't) */
97
header.rcode = 0; /* Success! */
99
/* Make the header a placeholder for now */
100
init_header(&header);
102
- header.rd = rd_val;
103
+ header.rd = rd_val; /* RDBUG udpstar */
104
if(make_hdr(&header,most) == JS_ERROR)
107
@@ -1654,7 +1656,7 @@
110
header.tc = 0; /* To do: truncation handling */
112
+ header.rd = 0; /* RDBUG udpstar */
115
header.rcode = 0; /* No error */
116
@@ -1675,7 +1677,7 @@
117
if(compress_data(most,ar) == JS_ERROR) {
119
udperror(sock,most,client,0,SERVER_FAIL,"compression failure",2,
123
if(synth_ns_record != 0) { js_destroy(synth_ns_record); }
125
@@ -1709,7 +1711,7 @@
126
if(synth_ns_record != 0) { js_destroy(synth_ns_record); }
128
udperror(sock,most,client,0,SERVER_FAIL,"giveerror in udpstar",2,
134
@@ -1779,7 +1781,7 @@
136
/* Make the header a placeholder for now */
137
init_header(&header);
138
- header.rd = rd_val;
139
+ header.rd = rd_val; /* RDBUG udpnotfound */
141
if(make_hdr(&header,most) == JS_ERROR) {
142
js_destroy(most); js_destroy(compressed);
143
@@ -1890,7 +1892,7 @@
146
header.tc = 0; /* To do: truncation handling */
148
+ header.rd = 0; /* RDBUG udpnotfound */
151
/* Code that verifies that this host does not exist in
152
@@ -1936,7 +1938,7 @@
153
if(compress_data(most,compressed) == JS_ERROR) {
154
js_destroy(compressed);
155
udperror(sock,most,client,0,SERVER_FAIL,"Compression failure",2,
161
@@ -1967,7 +1969,7 @@
163
js_destroy(compressed);
164
udperror(sock,most,client,0,SERVER_FAIL,"giveerror in udpnotfound",2,
170
@@ -2319,7 +2321,7 @@
171
header.opcode = 0; /* Normal DNS */
172
header.aa = 0; /* DDIP to A translations are never authoritative */
173
header.tc = 0; /* A labels are too short to be truncated */
174
- header.rd = 0; /* Recursion not desired */
175
+ header.rd = 0; /* Recursion not desired */ /* RDBUG ddip_check */
176
header.ra = 0; /* Recursion not available */
177
header.z = 0; /* This must be 0 unless we are EDNS aware (we aren't) */
178
header.rcode = 0; /* Success! */
179
@@ -2414,7 +2416,7 @@
182
int hunt_single_query(js_string *query, int id, int sock,
183
- conn *ect, js_string *question) {
184
+ conn *ect, js_string *question, int rd_val) {
186
int qtype_o, qtype_q;
187
/* js_string *lower; */
188
@@ -2432,11 +2434,11 @@
189
if(spot_data.value != 0 && spot_data.datatype == MARA_DNSRR) {
190
if(qtype_o == RR_A || qtype_q == RR_CNAME) {
191
udpsuccess(spot_data.value,id,sock,0,question,
192
- spot_data.point,1,rd_value,ect,force_auth);
193
+ spot_data.point,1,rd_val,ect,force_auth);
196
udpsuccess(spot_data.value,id,sock,0,question,
197
- spot_data.point,0,rd_value,ect,force_auth);
198
+ spot_data.point,0,rd_val,ect,force_auth);
202
@@ -2517,6 +2519,7 @@
204
struct sockaddr_in *z; /* Makes certain ugly declarations readable */
205
int always_not_there = 0;
210
@@ -2533,7 +2536,7 @@
213
/* See if they desire recursion or not */
214
- desires_recursion = rd_value = header.rd;
215
+ desires_recursion = rd_val = header.rd;
217
/* We only answer questions (Thanks to Roy Arends for pointing out this
219
@@ -2705,7 +2708,7 @@
220
/* OK, start the complicated domain look up routine */
221
/* Look for upper and lower case versions of the query as
223
- if(hunt_single_query(lookfor,header.id,sock,ect,origq) != 0) {
224
+ if(hunt_single_query(lookfor,header.id,sock,ect,origq,rd_val) != 0) {
225
js_destroy(lookfor); js_destroy(origq); js_destroy(lc);
228
@@ -2720,7 +2723,7 @@
229
if(change_rtype(lookfor,RR_CNAME) == JS_ERROR) {
232
- if(hunt_single_query(lookfor,header.id,sock,ect,origq) != 0) {
233
+ if(hunt_single_query(lookfor,header.id,sock,ect,origq,rd_val) != 0) {
234
js_destroy(lookfor); js_destroy(origq); js_destroy(lc);
237
--- maradns-1.3.07.06/sqa/regressions/do.tests 2007-10-19 08:52:19.000000000 -0500
238
+++ maradns-1.3.07.07/sqa/regressions/do.tests 2007-10-25 07:49:32.000000000 -0500
240
TESTS=$TESTS"long.chunk noat_parse_bug noise percent_parse_bug "
241
TESTS=$TESTS"predator1 predator2 ptr_leak recurse_delegation "
242
TESTS=$TESTS"star_handling_1 star_handling_2 star_handling_leak "
243
-TESTS=$TESTS"truncation zoneserver_doc improper_rotation "
244
+TESTS=$TESTS"truncation zoneserver_doc improper_rotation rd_val "
246
# Test to make sure synthetic ips in csv2 zone files correctly handle
247
# MaraDNS bound to private and public IPs
248
--- maradns-1.3.07.06/sqa/regressions/mararc_n_ipv6_bind_address/do.test 2007-10-04 15:11:10.000000000 -0500
249
+++ maradns-1.3.07.07/sqa/regressions/mararc_n_ipv6_bind_address/do.test 2007-10-25 09:29:06.000000000 -0500
252
#../../../tools/askmara Awww.example.com.
253
dig @fecf:aff0::1 www.example.com | grep -v DiG | grep -v WHEN | grep -v time \
255
+ | grep -v HEADER | grep -v flags
259
--- maradns-1.3.07.06/sqa/regressions/mararc_n_ipv6_bind_address/output.success 2007-10-04 15:11:19.000000000 -0500
260
+++ maradns-1.3.07.07/sqa/regressions/mararc_n_ipv6_bind_address/output.success 2007-10-25 09:29:23.000000000 -0500
263
;; global options: printcmd
265
-;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
268
;www.example.com. IN A