Commit ed9f8a3b authored by Petr Špaček's avatar Petr Špaček
Browse files

Merge branch 'rplint-fixes' into 'master'

Various fixes of mistakes in RPLs found using `rplint`

See merge request !121
parents 33d826de 799e071d
Pipeline #38480 passed with stage
in 1 minute and 35 seconds
......@@ -49,7 +49,7 @@ RANGE_BEGIN 0 100
ADDRESS 2.2.2.2
ENTRY_BEGIN
MATCH opcode qname qtype
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR RD NOERROR
SECTION QUESTION
com. IN NS
......
......@@ -18670,7 +18670,7 @@ SECTION ANSWER
ENTRY_END
; this is the correct answer
STEP 40060 REPLY
STEP 40070 REPLY
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
......
......@@ -101,6 +101,16 @@ SECTION AUTHORITY
root-servers.net. SOA bla bla 1 2 3 4 5
ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ncfphywebgtm01-c.ingdirect.com.au. IN AAAA
SECTION AUTHORITY
. SOA bla bla 1 2 3 4 5
ENTRY_END
ENTRY_BEGIN
MATCH opcode subdomain
ADJUST copy_id copy_query
......@@ -133,16 +143,6 @@ SECTION AUTHORITY
. SOA bla bla 1 2 3 4 5
ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ncfphywebgtm01-c.ingdirect.com.au. IN AAAA
SECTION AUTHORITY
. SOA bla bla 1 2 3 4 5
ENTRY_END
RANGE_END
; l4.nstld.com.
......
......@@ -91,7 +91,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
gtld-servers.net. IN A
......@@ -135,7 +135,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
root-servers.net. IN A
......
......@@ -89,7 +89,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
gtld-servers.net. IN A
......@@ -133,7 +133,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
root-servers.net. IN A
......
......@@ -35,7 +35,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode subdomain
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
com. IN A
......@@ -90,7 +90,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
gtld-servers.net. IN A
......@@ -133,7 +133,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
root-servers.net. IN A
......
......@@ -73,11 +73,11 @@ a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
MATCH opcode subdomain
ADJUST copy_id copy_query
MATCH opcode qtype qname
ADJUST copy_id
REPLY QR NOERROR
SECTION QUESTION
example.com. IN A
ns.example.com. IN AAAA
SECTION AUTHORITY
example.com. IN NS ns.example.net.
SECTION ADDITIONAL
......@@ -86,17 +86,18 @@ ns.example.net. IN A 1.2.3.1
ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
MATCH opcode subdomain
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN AAAA
example.com. IN A
SECTION AUTHORITY
example.com. IN NS ns.example.net.
SECTION ADDITIONAL
; note this will be scrubbed off
ns.example.net. IN A 1.2.3.1
ENTRY_END
RANGE_END
; e.gtld-servers.net.
......@@ -129,7 +130,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
root-servers.net. IN A
......@@ -173,7 +174,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
gtld-servers.net. IN A
......@@ -223,8 +224,6 @@ SECTION AUTHORITY
gtld-servers.net. IN SOA . . 0 0 0 0 0
ENTRY_END
ENTRY_BEGIN
MATCH opcode subdomain
ADJUST copy_id copy_query
......@@ -237,19 +236,6 @@ SECTION ADDITIONAL
; note this will be scrubbed off
ns.example.com. IN A 1.2.3.2
ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
REPLY QR NOERROR
SECTION QUESTION
ns.example.net. IN AAAA
SECTION AUTHORITY
example.net. IN NS ns.example.com.
SECTION ADDITIONAL
; note this will be scrubbed off
ns.example.com. IN A 1.2.3.2
ENTRY_END
RANGE_END
STEP 1 QUERY
......
......@@ -37,11 +37,11 @@ a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
MATCH opcode subdomain
ADJUST copy_id copy_query
MATCH opcode qtype qname
ADJUST copy_id
REPLY QR NOERROR
SECTION QUESTION
net. IN A
ns.example.net. IN AAAA
SECTION AUTHORITY
net. IN NS e.gtld-servers.net.
SECTION ADDITIONAL
......@@ -49,16 +49,17 @@ e.gtld-servers.net. IN A 192.12.94.30
ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
MATCH opcode subdomain
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.net. IN AAAA
net. IN A
SECTION AUTHORITY
net. IN NS e.gtld-servers.net.
SECTION ADDITIONAL
e.gtld-servers.net. IN A 192.12.94.30
ENTRY_END
RANGE_END
; a.gtld-servers.net.
......@@ -105,7 +106,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
gtld-servers.net. IN A
......@@ -171,7 +172,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
root-servers.net. IN A
......@@ -246,7 +247,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
gtld-servers.net. IN A
......@@ -313,7 +314,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
root-servers.net. IN A
......
......@@ -44,7 +44,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
root-servers.net. IN A
......@@ -88,7 +88,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
gtld-servers.net. IN A
......
......@@ -54,7 +54,7 @@ SECTION ANSWER
ENTRY_END
; this is the correct answer
STEP 60 REPLY
STEP 70 REPLY
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
......
......@@ -142,7 +142,6 @@ RANGE_END
; Now try the A type, which works, and is not LAME.
STEP 1 QUERY
ENTRY_BEGIN
MATCH TCP
REPLY RD
SECTION QUESTION
example.com. IN A
......@@ -162,7 +161,6 @@ ENTRY_END
; this fails; it is LAME
STEP 20 QUERY
ENTRY_BEGIN
MATCH TCP
REPLY RD
SECTION QUESTION
example.com. IN AAAA
......
......@@ -71,6 +71,7 @@ RANGE_BEGIN 0 100
ENTRY_BEGIN
MATCH opcode
ADJUST copy_id copy_query
REPLY QR SERVFAIL
ENTRY_END
......
......@@ -48,7 +48,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
root-servers.net. IN A
......@@ -92,7 +92,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
gtld-servers.net. IN A
......
......@@ -47,7 +47,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
root-servers.net. IN A
......@@ -91,7 +91,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
gtld-servers.net. IN A
......@@ -133,27 +133,6 @@ SECTION ADDITIONAL
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
a.gtld-servers.net. IN A
SECTION ANSWER
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
a.gtld-servers.net. IN AAAA
SECTION AUTHORITY
. SOA bla bla 1 2 3 4 5
ENTRY_END
RANGE_END
; a.gtld-servers.net.
......
......@@ -47,7 +47,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
root-servers.net. IN A
......@@ -156,25 +156,6 @@ SECTION ADDITIONAL
x.gtld-servers.net. IN A 192.5.6.31
ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
a.gtld-servers.net. IN A
SECTION ANSWER
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
a.gtld-servers.net. IN AAAA
SECTION AUTHORITY
. SOA bla bla 1 2 3 4 5
ENTRY_END
RANGE_END
; a.gtld-servers.net.
......
......@@ -186,6 +186,7 @@ ENTRY_END
; foo.com contents.
ENTRY_BEGIN
ADJUST copy_id
MATCH opcode qtype qname
REPLY QR NOERROR
SECTION QUESTION
......@@ -221,7 +222,7 @@ ENTRY_END
; recursion happens here.
STEP 10 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
MATCH flags rcode question answer
REPLY QR RD RA NOERROR
SECTION QUESTION
www.foo.com. IN A
......@@ -246,7 +247,7 @@ ENTRY_END
; recursion happens here.
STEP 40 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
MATCH flags rcode question answer
REPLY QR RD RA NOERROR
SECTION QUESTION
www.foo.com. IN A
......
......@@ -60,7 +60,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
root-servers.net. IN A
......@@ -104,7 +104,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
gtld-servers.net. IN A
......@@ -147,25 +147,6 @@ SECTION ADDITIONAL
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
a.gtld-servers.net. IN A
SECTION ANSWER
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
a.gtld-servers.net. IN AAAA
SECTION AUTHORITY
. SOA bla bla 1 2 3 4 5
ENTRY_END
RANGE_END
; a.gtld-servers.net.
......
......@@ -234,12 +234,10 @@ bad123.example.com. IN A
ENTRY_END
; recursion happens here.
; resolver gets address to spoofed server here
STEP 30 CHECK_ANSWER
ENTRY_BEGIN
; no matching here, just accept the answer to the spoofed query.
; it is wrong, but only one query ...
; this test is to check further on, that we still have the right nameserver.
;MATCH all
MATCH all
REPLY QR RD RA NOERROR
SECTION QUESTION
bad123.example.com. IN A
......
......@@ -63,7 +63,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
root-servers.net. IN A
......@@ -107,7 +107,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
gtld-servers.net. IN A
......
; config options
; target-fetch-policy: "0 0 0 0 0"
; name: "."
stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
CONFIG_END
;test from testbound
SCENARIO_BEGIN Test resolution with recursion, parent child differ, lame domain
; make sure it stops probing once is has cached all the badness.
; K.ROOT-SERVERS.NET.
RANGE_BEGIN 0 100
ADDRESS 193.0.14.129
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
REPLY QR NOERROR
SECTION QUESTION
. IN NS
SECTION ANSWER
. IN NS K.ROOT-SERVERS.NET.
SECTION ADDITIONAL
K.ROOT-SERVERS.NET. IN A 193.0.14.129
ENTRY_END
ENTRY_BEGIN
MATCH opcode subdomain
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
com. IN NS
SECTION AUTHORITY
com. IN NS a.gtld-servers.net.
SECTION ADDITIONAL
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
MATCH opcode subdomain
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
net. IN NS
SECTION AUTHORITY
net. IN NS e.gtld-servers.net.
SECTION ADDITIONAL
e.gtld-servers.net. IN A 192.12.94.30
ENTRY_END
RANGE_END
; a.gtld-servers.net.
RANGE_BEGIN 0 100
ADDRESS 192.5.6.30
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
REPLY QR NOERROR
SECTION QUESTION
com. IN NS
SECTION ANSWER
com. IN NS a.gtld-servers.net.
SECTION ADDITIONAL
a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
MATCH opcode subdomain
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN NS
SECTION AUTHORITY
example.com. IN NS ns.example.net.
ENTRY_END
RANGE_END
; e.gtld-servers.net.
RANGE_BEGIN 0 100
ADDRESS 192.12.94.30
ENTRY_BEGIN
MATCH opcode subdomain
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
net. IN NS
SECTION ANSWER
net. IN NS e.gtld-servers.net.
SECTION ADDITIONAL
e.gtld-servers.net. IN A 192.12.94.30
ENTRY_END
ENTRY_BEGIN
MATCH opcode subdomain
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.net. IN NS
SECTION AUTHORITY
example.net. IN NS ns.example.net.
SECTION ADDITIONAL
ns.example.net. IN A 1.2.3.44
ENTRY_END
RANGE_END
RANGE_BEGIN 0 200
ADDRESS 1.2.3.44
ENTRY_BEGIN
MATCH opcode
ADJUST copy_id copy_query
REPLY QR SERVFAIL
SECTION QUESTION
example.net. IN NS
SECTION ANSWER
ENTRY_END
RANGE_END
; Does not respond to anything (servfail instead
; of timeouts since this is easier to encode in .rpl file format).
RANGE_BEGIN 0 200
ADDRESS 1.2.3.55
ENTRY_BEGIN
MATCH opcode
ADJUST copy_id copy_query