File: fwd_cached.rpl

package info (click to toggle)
unbound 1.4.22-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 19,188 kB
  • sloc: ansic: 69,823; sh: 11,938; yacc: 1,259; makefile: 1,168; python: 1,107; perl: 141
file content (73 lines) | stat: -rw-r--r-- 1,563 bytes parent folder | download | duplicates (9)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
; This is a comment.
; config options go here.
forward-zone: name: "." forward-addr: 216.0.0.1
CONFIG_END

SCENARIO_BEGIN Query receives answer from the cache

STEP 1 QUERY
ENTRY_BEGIN
	REPLY RD
	SECTION QUESTION
	www.example.com. IN A
ENTRY_END
; the query is sent to the forwarder - no cache yet.
STEP 2 CHECK_OUT_QUERY
ENTRY_BEGIN
	MATCH qname qtype opcode
	SECTION QUESTION
	www.example.com. IN A
ENTRY_END
STEP 3 REPLY
ENTRY_BEGIN
	MATCH opcode qtype qname
	ADJUST copy_id
	; authoritative answer
	REPLY QR AA RD RA NOERROR
	SECTION QUESTION
	www.example.com. IN A
	SECTION ANSWER
	www.example.com. IN A 10.20.30.40
	SECTION AUTHORITY
	www.example.com. IN NS ns.example.com.
	SECTION ADDITIONAL
	ns.example.com. IN A 10.20.30.50
ENTRY_END
STEP 4 CHECK_ANSWER
ENTRY_BEGIN
	MATCH all 
	REPLY QR RD RA
	SECTION QUESTION
	www.example.com. IN A
	SECTION ANSWER
	www.example.com. IN A 10.20.30.40
	SECTION AUTHORITY
	www.example.com. IN NS ns.example.com.
	SECTION ADDITIONAL
	ns.example.com. IN A 10.20.30.50
ENTRY_END

; another query, same, so it must be answered from the cache
STEP 5 QUERY
ENTRY_BEGIN
	REPLY RD
	SECTION QUESTION
	www.example.com. IN A
ENTRY_END
; immediate answer without an OUT_QUERY happening (checked on exit)
; also, the answer does not have AA set
STEP 6 CHECK_ANSWER
ENTRY_BEGIN
	MATCH all
	REPLY QR RD RA
	SECTION QUESTION
	www.example.com. IN A
	SECTION ANSWER
	www.example.com. IN A 10.20.30.40
	SECTION AUTHORITY
	www.example.com. IN NS ns.example.com.
	SECTION ADDITIONAL
	ns.example.com. IN A 10.20.30.50
ENTRY_END

SCENARIO_END