1; config options 2server: 3 target-fetch-policy: "0 0 0 0 0" 4 5auth-zone: 6 name: "example.com." 7 ## zonefile (or none). 8 ## zonefile: "example.com.zone" 9 ## master by IP address or hostname 10 ## can list multiple masters, each on one line. 11 ## master: 12 master: 1.2.3.44 13 ## url for http fetch 14 ## url: 15 ## queries from downstream clients get authoritative answers. 16 ## for-downstream: yes 17 for-downstream: yes 18 ## queries are used to fetch authoritative answers from this zone, 19 ## instead of unbound itself sending queries there. 20 ## for-upstream: yes 21 for-upstream: yes 22 ## on failures with for-upstream, fallback to sending queries to 23 ## the authority servers 24 ## fallback-enabled: no 25 26 ## this line generates zonefile: \n"/tmp/xxx.example.com"\n 27 zonefile: 28TEMPFILE_NAME example.com 29 ## this is the inline file /tmp/xxx.example.com 30 ## the tempfiles are deleted when the testrun is over. 31TEMPFILE_CONTENTS example.com 32example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600 33example.com. 3600 IN NS ns.example.net. 34www.example.com. 3600 IN A 1.2.3.4 35mail.example.com. 3600 IN A 1.2.3.4 36mail.example.com. 3600 IN A 1.2.3.5 37mail.example.com. 3600 IN A 1.2.3.6 38mail.example.com. 3600 IN A 1.2.3.7 39TEMPFILE_END 40 41stub-zone: 42 name: "." 43 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET. 44CONFIG_END 45 46SCENARIO_BEGIN Test authority zone with IXFR that has mismatched data 47 48; K.ROOT-SERVERS.NET. 49RANGE_BEGIN 0 100 50 ADDRESS 193.0.14.129 51ENTRY_BEGIN 52MATCH opcode qtype qname 53ADJUST copy_id 54REPLY QR NOERROR 55SECTION QUESTION 56. IN NS 57SECTION ANSWER 58. IN NS K.ROOT-SERVERS.NET. 59SECTION ADDITIONAL 60K.ROOT-SERVERS.NET. IN A 193.0.14.129 61ENTRY_END 62 63ENTRY_BEGIN 64MATCH opcode subdomain 65ADJUST copy_id copy_query 66REPLY QR NOERROR 67SECTION QUESTION 68com. IN NS 69SECTION AUTHORITY 70com. IN NS a.gtld-servers.net. 71SECTION ADDITIONAL 72a.gtld-servers.net. IN A 192.5.6.30 73ENTRY_END 74RANGE_END 75 76; a.gtld-servers.net. 77RANGE_BEGIN 0 100 78 ADDRESS 192.5.6.30 79ENTRY_BEGIN 80MATCH opcode qtype qname 81ADJUST copy_id 82REPLY QR NOERROR 83SECTION QUESTION 84com. IN NS 85SECTION ANSWER 86com. IN NS a.gtld-servers.net. 87SECTION ADDITIONAL 88a.gtld-servers.net. IN A 192.5.6.30 89ENTRY_END 90 91ENTRY_BEGIN 92MATCH opcode subdomain 93ADJUST copy_id copy_query 94REPLY QR NOERROR 95SECTION QUESTION 96example.com. IN NS 97SECTION AUTHORITY 98example.com. IN NS ns.example.com. 99SECTION ADDITIONAL 100ns.example.com. IN A 1.2.3.44 101ENTRY_END 102RANGE_END 103 104; ns.example.net. 105RANGE_BEGIN 0 100 106 ADDRESS 1.2.3.44 107ENTRY_BEGIN 108MATCH opcode qtype qname 109ADJUST copy_id 110REPLY QR NOERROR 111SECTION QUESTION 112example.net. IN NS 113SECTION ANSWER 114example.net. IN NS ns.example.net. 115SECTION ADDITIONAL 116ns.example.net. IN A 1.2.3.44 117ENTRY_END 118 119ENTRY_BEGIN 120MATCH opcode qtype qname 121ADJUST copy_id 122REPLY QR NOERROR 123SECTION QUESTION 124ns.example.net. IN A 125SECTION ANSWER 126ns.example.net. IN A 1.2.3.44 127SECTION AUTHORITY 128example.net. IN NS ns.example.net. 129ENTRY_END 130 131ENTRY_BEGIN 132MATCH opcode qtype qname 133ADJUST copy_id 134REPLY QR NOERROR 135SECTION QUESTION 136ns.example.net. IN AAAA 137SECTION AUTHORITY 138example.net. IN NS ns.example.net. 139SECTION ADDITIONAL 140www.example.net. IN A 1.2.3.44 141ENTRY_END 142 143ENTRY_BEGIN 144MATCH opcode qtype qname 145ADJUST copy_id 146REPLY QR NOERROR 147SECTION QUESTION 148example.com. IN NS 149SECTION ANSWER 150example.com. IN NS ns.example.net. 151ENTRY_END 152 153ENTRY_BEGIN 154MATCH opcode qtype qname 155ADJUST copy_id 156REPLY QR NOERROR 157SECTION QUESTION 158www.example.com. IN A 159SECTION ANSWER 160www.example.com. IN A 10.20.30.40 161ENTRY_END 162 163ENTRY_BEGIN 164MATCH opcode qtype qname 165ADJUST copy_id 166REPLY QR NOERROR 167SECTION QUESTION 168example.com. IN SOA 169SECTION ANSWER 170; serial, refresh, retry, expire, minimum 171example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600 172ENTRY_END 173 174ENTRY_BEGIN 175MATCH opcode qtype qname 176ADJUST copy_id 177REPLY QR AA NOERROR 178SECTION QUESTION 179example.com. IN IXFR 180SECTION ANSWER 181example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600 182example.com. IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600 183www.example.com. IN A 1.2.3.4 184mail.example.com. 3600 IN A 1.2.3.6 185; this is the delete of the nonexistent entry 186nonexist.example.com. 3600 IN A 1.2.3.4 187example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600 188EXTRA_PACKET 189REPLY QR AA NOERROR 190SECTION QUESTION 191example.com. IN IXFR 192SECTION ANSWER 193www.example.com. IN A 1.2.3.5 194mail.example.com. 3600 IN A 1.2.3.8 195mail.example.com. IN AAAA ::5 196add2.example.com. 3600 IN A 1.2.3.4 197example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600 198ENTRY_END 199 200ENTRY_BEGIN 201MATCH opcode qtype qname 202ADJUST copy_id 203REPLY QR AA NOERROR 204SECTION QUESTION 205example.com. IN AXFR 206SECTION ANSWER 207example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600 208example.com. IN NS ns.example.net. 209EXTRA_PACKET 210REPLY QR AA NOERROR 211SECTION QUESTION 212example.com. IN AXFR 213SECTION ANSWER 214www.example.com. IN A 1.2.3.6 215example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600 216ENTRY_END 217RANGE_END 218 219STEP 1 QUERY 220ENTRY_BEGIN 221REPLY RD 222SECTION QUESTION 223www.example.com. IN A 224ENTRY_END 225STEP 2 TIME_PASSES ELAPSE 1 226 227; recursion happens here. 228STEP 20 CHECK_ANSWER 229ENTRY_BEGIN 230MATCH all 231REPLY QR AA RD RA NOERROR 232SECTION QUESTION 233www.example.com. IN A 234SECTION ANSWER 235www.example.com. IN A 1.2.3.4 236ENTRY_END 237 238STEP 30 TIME_PASSES ELAPSE 3600 239STEP 40 TRAFFIC 240 241STEP 50 QUERY 242ENTRY_BEGIN 243REPLY RD 244SECTION QUESTION 245www.example.com. IN A 246ENTRY_END 247 248; recursion happens here. 249STEP 60 CHECK_ANSWER 250ENTRY_BEGIN 251MATCH all 252REPLY QR AA RD RA NOERROR 253SECTION QUESTION 254www.example.com. IN A 255SECTION ANSWER 256www.example.com. IN A 1.2.3.6 257ENTRY_END 258 259; the zonefile was updated with new contents 260STEP 70 CHECK_TEMPFILE example.com 261FILE_BEGIN 262example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600 263example.com. 3600 IN NS ns.example.net. 264www.example.com. 3600 IN A 1.2.3.6 265FILE_END 266 267SCENARIO_END 268