1; config options 2server: 3 target-fetch-policy: "0 0 0 0 0" 4 5auth-zone: 6 name: "example.tld." 7 for-upstream: yes 8 for-downstream: no 9 fallback-enabled: no 10 ## this line generates zonefile: "/tmp/xxx.example.tld" 11 zonefile: 12TEMPFILE_NAME example.tld 13 ## this is the inline file /tmp/xxx.example.tld 14 ## the tempfiles are deleted when the testrun is over. 15TEMPFILE_CONTENTS example.tld 16$ORIGIN tld. 17example 3600 IN SOA a b 1 2 3 4 5 18 3600 IN NS ns.example.tld. 19$ORIGIN example.tld. 20ns 3600 IN A 1.2.3.4 21www 3600 IN A 3.3.3.3 22more 3600 IN NS ns.more.tld. 23TEMPFILE_END 24 25forward-zone: 26 name: "." 27 forward-addr: 9.9.9.9 28 29stub-zone: 30 name: "tld" 31 stub-addr: 2.3.4.5 32stub-zone: 33 name: "more.example.tld" 34 stub-addr: 2.3.4.7 35CONFIG_END 36 37SCENARIO_BEGIN Test iterator's ability to route the request to the correct, configured delegation point 38; Preference should be auth-zone > stub-zone > forward-zone 39; But configuration-wise, since everything is an entry on the forwards tree 40; (or a hole in the case of stub/auth), forwards cannot be replaced by 41; stubs/auth. 42; Also stub/auth zones end the part of the tree that gets forwarded, e.g., 43; delegations from an auth/stub cannot be caught by a higher forwarder, it will 44; be recursively resolved instead. 45 46; '.' forwarder 47RANGE_BEGIN 0 100 48 ADDRESS 9.9.9.9 49ENTRY_BEGIN 50MATCH opcode qtype qname 51ADJUST copy_id 52REPLY QR NOERROR 53SECTION QUESTION 54www.deleg.tld. IN A 55SECTION ANSWER 56www.deleg.tld. IN A 3.3.3.3 57ENTRY_END 58 59ENTRY_BEGIN 60MATCH opcode qtype qname 61ADJUST copy_id 62REPLY QR NOERROR 63SECTION QUESTION 64www.more.example.tld. IN A 65SECTION ANSWER 66www.more.example.tld. IN A 3.3.3.3 67ENTRY_END 68RANGE_END 69 70; 'tld.' stub server 71RANGE_BEGIN 0 100 72 ADDRESS 2.3.4.5 73ENTRY_BEGIN 74MATCH opcode qtype qname 75ADJUST copy_id 76REPLY QR AA NOERROR 77SECTION QUESTION 78www.tld. IN A 79SECTION ANSWER 80www.tld. IN A 3.3.3.3 81ENTRY_END 82RANGE_END 83 84; 'more.example.tld.' stub server 85RANGE_BEGIN 0 100 86 ADDRESS 2.3.4.7 87ENTRY_BEGIN 88MATCH opcode qtype qname 89ADJUST copy_id 90REPLY QR AA NOERROR 91SECTION QUESTION 92www.more.example.tld. IN A 93SECTION ANSWER 94www.more.example.tld. IN A 3.3.3.3 95ENTRY_END 96RANGE_END 97 98; query www.tld ... 99STEP 1 QUERY 100ENTRY_BEGIN 101REPLY RD 102SECTION QUESTION 103www.tld. IN A 104ENTRY_END 105 106; ... answer should come from 'tld.' stub zone 107STEP 2 CHECK_ANSWER 108ENTRY_BEGIN 109MATCH all 110REPLY QR RD RA NOERROR 111SECTION QUESTION 112www.tld. IN A 113SECTION ANSWER 114www.tld. IN A 3.3.3.3 115ENTRY_END 116 117; query www.example.tld ... 118STEP 3 QUERY 119ENTRY_BEGIN 120REPLY RD 121SECTION QUESTION 122www.example.tld. IN A 123ENTRY_END 124 125; ... answer should come from 'example.tld.' auth zone 126STEP 4 CHECK_ANSWER 127ENTRY_BEGIN 128MATCH all 129REPLY QR RD RA NOERROR 130SECTION QUESTION 131www.example.tld. IN A 132SECTION ANSWER 133www.example.tld. IN A 3.3.3.3 134ENTRY_END 135 136; query www.more.example.tld ... 137STEP 5 QUERY 138ENTRY_BEGIN 139REPLY RD 140SECTION QUESTION 141www.more.example.tld. IN A 142ENTRY_END 143 144; ... answer should come from 'more.example.tld.' stub zone 145STEP 6 CHECK_ANSWER 146ENTRY_BEGIN 147MATCH all 148REPLY QR RD RA NOERROR 149SECTION QUESTION 150www.more.example.tld. IN A 151SECTION ANSWER 152www.more.example.tld. IN A 3.3.3.3 153ENTRY_END 154 155SCENARIO_END 156