/
deadwood-2.9.01-edgecastcdn.net.patch
39 lines (35 loc) · 1.57 KB
/
deadwood-2.9.01-edgecastcdn.net.patch
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
Deadwood was getting confused by packets like this:
$ askmara Awac.0B2D.edgecastcdn.net. 72.21.80.5
# Querying the server with the IP 72.21.80.5
# Question: Awac.0B2D.edgecastcdn.net.
wac.0B2D.edgecastcdn.net. +3600 cname ne.wac.edgecastcdn.net.
#ne1.wac.edgecastcdn.net. +14400 a 72.21.91.19
# NS replies:
#wac.edgecastcdn.net. +14400 ns ns1.edgecastcdn.net.
#wac.edgecastcdn.net. +14400 ns ns2.edgecastcdn.net.
# AR replies:
#ne.wac.edgecastcdn.net. +3600 cname ne1.wac.edgecastcdn.net.
#ns1.edgecastcdn.net. +172800 a 72.21.80.5
#ns2.edgecastcdn.net. +172800 a 72.21.80.6
This patch fixes the problem.
--- deadwood-2.9.02/src/DwRecurse.c.orig 2010-07-29 01:56:26.000000000 -0700
+++ deadwood-2.9.02/src/DwRecurse.c 2010-07-29 01:56:58.000000000 -0700
@@ -943,6 +943,9 @@
}
for(counter = 0; counter < view->look->ancount * 2; counter += 2) {
+ if(view->an_types[(counter >> 1)] == RRX_IGNORE) {
+ break;
+ }
if(view->an_types[(counter >> 1)] != RR_CNAME) {
goto catch_dwx_make_cname_refer;
}
@@ -1421,7 +1424,8 @@
dwx_rrtype_number(query_type)) {
return TYPE_ANSWER;
}
- if(view->an_types[counter] != RR_CNAME) {
+ if(view->an_types[counter] != RR_CNAME &&
+ view->an_types[counter] != RRX_IGNORE) {
return TYPE_NO_USEFUL_DATA;
}
}