]> git.saurik.com Git - apple/network_cmds.git/blob - unbound/testdata/trust_cname_chain.rpl
e4d2d2a99b7b9face3aaa1a4141fe82272624900
[apple/network_cmds.git] / unbound / testdata / trust_cname_chain.rpl
1 ; config options
2 server:
3 target-fetch-policy: "0 0 0 0 0"
4 stub-zone:
5 name: "."
6 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
7 CONFIG_END
8
9 SCENARIO_BEGIN Test trust in cname chain answer
10
11 ; K.ROOT-SERVERS.NET.
12 RANGE_BEGIN 0 100
13 ADDRESS 193.0.14.129
14 ENTRY_BEGIN
15 MATCH opcode qtype
16 ADJUST copy_id copy_query
17 REPLY QR NOERROR
18 SECTION QUESTION
19 . IN NS
20 SECTION ANSWER
21 . IN NS K.ROOT-SERVERS.NET.
22 SECTION ADDITIONAL
23 K.ROOT-SERVERS.NET. IN A 193.0.14.129
24 ENTRY_END
25
26 ENTRY_BEGIN
27 MATCH opcode qtype
28 ADJUST copy_id copy_query
29 REPLY QR NOERROR
30 SECTION QUESTION
31 www.example.com. IN A
32 SECTION AUTHORITY
33 com. IN NS a.gtld-servers.net.
34 SECTION ADDITIONAL
35 a.gtld-servers.net. IN A 192.5.6.30
36 ENTRY_END
37 RANGE_END
38
39 ; a.gtld-servers.net.
40 RANGE_BEGIN 0 100
41 ADDRESS 192.5.6.30
42 ENTRY_BEGIN
43 MATCH opcode qtype
44 ADJUST copy_id copy_query
45 REPLY QR NOERROR
46 SECTION QUESTION
47 com. IN NS
48 SECTION ANSWER
49 com. IN NS a.gtld-servers.net.
50 SECTION ADDITIONAL
51 a.gtld-servers.net. IN A 192.5.6.30
52 ENTRY_END
53
54 ENTRY_BEGIN
55 MATCH opcode qtype
56 ADJUST copy_id copy_query
57 REPLY QR NOERROR
58 SECTION QUESTION
59 www.example.com. IN A
60 SECTION AUTHORITY
61 example.com. IN NS ns.example.com.
62 SECTION ADDITIONAL
63 ns.example.com. IN A 1.2.3.4
64 ENTRY_END
65 RANGE_END
66
67 ; ns.example.com.
68 RANGE_BEGIN 0 100
69 ADDRESS 1.2.3.4
70 ENTRY_BEGIN
71 MATCH opcode qtype
72 ADJUST copy_id copy_query
73 REPLY QR NOERROR
74 SECTION QUESTION
75 example.com. IN NS
76 SECTION ANSWER
77 example.com. IN NS ns.example.com.
78 SECTION ADDITIONAL
79 ns.example.com. IN A 1.2.3.4
80 ENTRY_END
81
82 ENTRY_BEGIN
83 MATCH opcode qtype qname
84 ADJUST copy_id
85 REPLY QR AA NOERROR
86 SECTION QUESTION
87 www.example.com. IN A
88 SECTION ANSWER
89 www.example.com. IN CNAME xxx.example.com.
90 xxx.example.com. IN CNAME yyy.example.com.
91 yyy.example.com. IN A 10.20.30.40
92 SECTION AUTHORITY
93 example.com. IN NS ns.example.com.
94 SECTION ADDITIONAL
95 ns.example.com. IN A 1.2.3.4
96 ENTRY_END
97 ENTRY_BEGIN
98 MATCH opcode qtype qname
99 ADJUST copy_id
100 REPLY QR AA NOERROR
101 SECTION QUESTION
102 xxx.example.com. IN A
103 SECTION ANSWER
104 xxx.example.com. IN CNAME yyy.example.com.
105 yyy.example.com. IN A 10.20.30.40
106 SECTION AUTHORITY
107 example.com. IN NS ns.example.com.
108 SECTION ADDITIONAL
109 ns.example.com. IN A 1.2.3.4
110 ENTRY_END
111 ENTRY_BEGIN
112 MATCH opcode qtype qname
113 ADJUST copy_id
114 REPLY QR AA NOERROR
115 SECTION QUESTION
116 yyy.example.com. IN A
117 SECTION ANSWER
118 yyy.example.com. IN A 10.20.30.42
119 SECTION AUTHORITY
120 example.com. IN NS ns.example.com.
121 SECTION ADDITIONAL
122 ns.example.com. IN A 1.2.3.4
123 ENTRY_END
124 RANGE_END
125
126
127 ; This stores it into cache.
128 STEP 1 QUERY
129 ENTRY_BEGIN
130 REPLY RD
131 SECTION QUESTION
132 www.example.com. IN A
133 ENTRY_END
134
135 ; recursion happens here.
136 STEP 10 CHECK_ANSWER
137 ENTRY_BEGIN
138 MATCH all
139 REPLY QR RD RA NOERROR
140 SECTION QUESTION
141 www.example.com. IN A
142 SECTION ANSWER
143 www.example.com. IN CNAME xxx.example.com.
144 xxx.example.com. IN CNAME yyy.example.com.
145 ;;; did not trust the remainder of the CNAME chain!
146 yyy.example.com. IN A 10.20.30.42
147 SECTION AUTHORITY
148 example.com. IN NS ns.example.com.
149 SECTION ADDITIONAL
150 ns.example.com. IN A 1.2.3.4
151 ENTRY_END
152
153 SCENARIO_END