Commit 93ed2de2 authored by Štěpán Balážik's avatar Štěpán Balážik

pydnstest: Make "ADJUST copy_id" just copy the id

Previously it would also copy the question section, making "ADJUST copy_id copy_query" and "ADJUST copy_id" functionally equivalent.
parent 6c539f14
Pipeline #49690 failed with stage
in 2 minutes and 52 seconds
......@@ -78,9 +78,6 @@ class DNSReply(DNSMessage):
answer.use_edns(query.edns, query.ednsflags, options=self.message.options)
if copy_id:
answer.id = query.id
# Copy letter-case if the template has QD
if answer.question:
answer.question[0].name = query.question[0].name
if copy_query:
answer.question = query.question
# Re-set, as the EDNS might have reset the ext-rcode
......
......@@ -19,7 +19,7 @@ RANGE_BEGIN 0 100
ADDRESS 193.0.14.129
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
. IN NS
......@@ -31,7 +31,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
www.example.com. IN A
......@@ -47,7 +47,7 @@ RANGE_BEGIN 0 100
ADDRESS 192.5.6.30
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
com. IN NS
......@@ -59,7 +59,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.blabla.com. IN A
......@@ -69,7 +69,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.blabla.com. IN AAAA
......@@ -97,7 +97,7 @@ RANGE_BEGIN 0 100
ADDRESS 1.2.3.4
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN NS
......@@ -112,7 +112,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN A
......@@ -124,7 +124,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN AAAA
......@@ -137,7 +137,7 @@ ENTRY_END
; response to DNSKEY priming query
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN DNSKEY
......@@ -158,7 +158,7 @@ ENTRY_END
; response to query of interest
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
www.example.com. IN A
......@@ -180,7 +180,7 @@ RANGE_BEGIN 0 100
ADDRESS 1.2.3.5
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN NS
......@@ -195,7 +195,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN A
......@@ -207,7 +207,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN AAAA
......@@ -220,7 +220,7 @@ ENTRY_END
; response to DNSKEY priming query
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN DNSKEY
......@@ -239,7 +239,7 @@ ENTRY_END
; response to query of interest
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
www.example.com. IN A
......
......@@ -21,7 +21,7 @@ RANGE_BEGIN 0 100
ADDRESS 193.0.14.129
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
. IN NS
......@@ -49,7 +49,7 @@ RANGE_BEGIN 0 100
ADDRESS 192.5.6.30
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
com. IN NS
......@@ -61,7 +61,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.blabla.com. IN A
......@@ -71,7 +71,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.blabla.com. IN AAAA
......@@ -81,7 +81,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.foo.com. IN A
......@@ -91,7 +91,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.foo.com. IN AAAA
......@@ -119,7 +119,7 @@ RANGE_BEGIN 0 100
ADDRESS 1.2.3.4
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN NS
......@@ -134,7 +134,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN A
......@@ -146,7 +146,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN AAAA
......@@ -159,7 +159,7 @@ ENTRY_END
; response to DNSKEY priming query
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN DNSKEY
......@@ -179,7 +179,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
www.example.com. IN A
......@@ -198,7 +198,7 @@ ENTRY_END
; DS request
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.example.com. IN DS
......@@ -231,7 +231,7 @@ RANGE_BEGIN 0 100
ADDRESS 1.2.3.5
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN NS
......@@ -246,7 +246,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN A
......@@ -258,7 +258,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN AAAA
......@@ -271,7 +271,7 @@ ENTRY_END
; response to DNSKEY priming query
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN DNSKEY
......@@ -289,7 +289,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
www.example.com. IN A
......@@ -308,7 +308,7 @@ ENTRY_END
; DS request
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.example.com. IN DS
......@@ -339,7 +339,7 @@ RANGE_BEGIN 0 100
ADDRESS 1.2.4.6
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.example.com. IN DNSKEY
......@@ -350,7 +350,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.example.com. IN NS
......@@ -365,7 +365,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
ns.sub.example.com. IN A
......@@ -376,7 +376,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
ns.sub.example.com. IN AAAA
......@@ -389,7 +389,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
www.sub.example.com. IN A
......@@ -405,7 +405,7 @@ RANGE_BEGIN 0 100
ADDRESS 1.2.4.7
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.example.com. IN DNSKEY
......@@ -416,7 +416,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.example.com. IN NS
......@@ -431,7 +431,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
ns.sub.example.com. IN A
......@@ -442,7 +442,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
ns.sub.example.com. IN AAAA
......@@ -455,7 +455,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
www.sub.example.com. IN A
......
......@@ -19,7 +19,7 @@ RANGE_BEGIN 0 100
ADDRESS 193.0.14.129
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
. IN NS
......@@ -47,7 +47,7 @@ RANGE_BEGIN 0 100
ADDRESS 192.5.6.30
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
com. IN NS
......@@ -59,7 +59,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.blabla.com. IN A
......@@ -69,7 +69,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.blabla.com. IN AAAA
......@@ -97,7 +97,7 @@ RANGE_BEGIN 0 100
ADDRESS 1.2.3.4
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN NS
......@@ -112,7 +112,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN A
......@@ -124,7 +124,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN AAAA
......@@ -137,7 +137,7 @@ ENTRY_END
; response to DNSKEY priming query
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN DNSKEY
......@@ -157,7 +157,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
www.example.com. IN A
......@@ -176,7 +176,7 @@ ENTRY_END
; DS request
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.example.com. IN DS
......@@ -207,7 +207,7 @@ RANGE_BEGIN 0 100
ADDRESS 1.2.3.5
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN NS
......@@ -222,7 +222,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN A
......@@ -234,7 +234,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN AAAA
......@@ -247,7 +247,7 @@ ENTRY_END
; response to DNSKEY priming query
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN DNSKEY
......@@ -265,7 +265,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
www.example.com. IN A
......@@ -284,7 +284,7 @@ ENTRY_END
; DS request
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.example.com. IN DS
......@@ -315,7 +315,7 @@ RANGE_BEGIN 0 100
ADDRESS 1.2.4.6
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.example.com. IN DNSKEY
......@@ -326,7 +326,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.example.com. IN NS
......@@ -341,7 +341,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
ns.sub.example.com. IN A
......@@ -352,7 +352,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
ns.sub.example.com. IN AAAA
......@@ -365,7 +365,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
www.sub.example.com. IN A
......
......@@ -21,7 +21,7 @@ RANGE_BEGIN 0 100
ADDRESS 193.0.14.129
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
. IN NS
......@@ -49,7 +49,7 @@ RANGE_BEGIN 0 100
ADDRESS 192.5.6.30
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
com. IN NS
......@@ -61,7 +61,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.blabla.com. IN A
......@@ -71,7 +71,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.blabla.com. IN AAAA
......@@ -99,7 +99,7 @@ RANGE_BEGIN 0 100
ADDRESS 1.2.3.4
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN NS
......@@ -114,7 +114,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN A
......@@ -126,7 +126,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN AAAA
......@@ -139,7 +139,7 @@ ENTRY_END
; response to DNSKEY priming query
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN DNSKEY
......@@ -159,7 +159,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
www.example.com. IN A
......@@ -178,7 +178,7 @@ ENTRY_END
; ENT request
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.example.com. IN DS
......@@ -193,7 +193,7 @@ ENTRY_END
; DS request
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.sub.example.com. IN DS
......@@ -224,7 +224,7 @@ RANGE_BEGIN 0 100
ADDRESS 1.2.3.5
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN NS
......@@ -239,7 +239,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN A
......@@ -251,7 +251,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
ns.example.com. IN AAAA
......@@ -264,7 +264,7 @@ ENTRY_END
; response to DNSKEY priming query
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
example.com. IN DNSKEY
......@@ -282,7 +282,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
www.example.com. IN A
......@@ -301,7 +301,7 @@ ENTRY_END
; ENT request
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.example.com. IN DS
......@@ -316,7 +316,7 @@ ENTRY_END
; DS request
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.sub.example.com. IN DS
......@@ -348,7 +348,7 @@ RANGE_BEGIN 0 100
ADDRESS 1.2.4.6
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id
ADJUST copy_id copy_query
REPLY QR AA NOERROR
SECTION QUESTION
sub.sub.example.com. IN DNSKEY
......@@ -359,7 +359,7 @@ ENTRY_END
ENTRY_BEGIN
MATCH opcode qtype qname
ADJUST copy_id