Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix queries and response packets content for undelegated tests #1150

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

tgreenx
Copy link
Contributor

@tgreenx tgreenx commented Nov 23, 2022

Purpose

For undelegated tests (fake delegation), this PR adds the QR flag in queries and AA flag depending if DS record is provided or not.

Context

Fixes #1100

Changes

  • Sets the QR flag for queries in undelegated tests
  • Sets the AA flag for queries in undelegated tests with DS record
  • Returns empty sections in response packet to a DS query in undelegated tests with no DS record

How to test this PR

zonemaster-cli 190.187.193.in-addr.arpa --ns ns1.oxilion.nl --ns ns2.oxilion.nl --ns ns3.oxilion.net --raw --level debug3 --test dnssec/dnssec11 > debug-dnssec11

Inspect debug file debug-dnssec11. Search for type=DS. Look at flags and packet content thereafter. You can change query type in dnssec11 and compare.

@tgreenx tgreenx added the T-Bug Type: Bug in software or error in test case description label Nov 23, 2022
@tgreenx tgreenx added this to the v2022.2 milestone Nov 23, 2022
@matsduf
Copy link
Contributor

matsduf commented Nov 23, 2022

Inspect debug file debug-dnssec11. Search for type=DS. Look at flags and packet content thereafter. You can change query type in dnssec11 and compare.

How can you change the query type when running a test case?

@tgreenx
Copy link
Contributor Author

tgreenx commented Nov 28, 2022

Inspect debug file debug-dnssec11. Search for type=DS. Look at flags and packet content thereafter. You can change query type in dnssec11 and compare.

How can you change the query type when running a test case?

You change query type directly in the code of the Test Case, for example here. And just add die; right after to abort the test early, it is enough for our purpose.

my $ds_p = $ns->query( $zone->name, q{SOA}, { dnssec => 1, usevc => 0 } );
die;

@tgreenx tgreenx requested a review from matsduf November 29, 2022 08:46
@tgreenx
Copy link
Contributor Author

tgreenx commented Dec 5, 2022

@matsduf please re-review

@tgreenx tgreenx merged commit 8b7270e into zonemaster:develop Dec 5, 2022
@matsduf matsduf added the V-Patch Versioning: The change gives an update of patch in version. label Dec 13, 2022
@matsduf
Copy link
Contributor

matsduf commented Dec 16, 2022

The "How to test" does not work. In undelegated test there is no DS query for DNSSEC11. The following command works better:

zonemaster-cli 190.187.193.in-addr.arpa --ns ns1.oxilion.nl --ns ns2.oxilion.nl --ns ns3.oxilion.net --raw --level debug3 --test dnssec/dnssec02 > debug-dnssec02

@matsduf
Copy link
Contributor

matsduf commented Dec 16, 2022

The result looks strange, but it probably does not affect the end result of Zonemaster. Issue #1169 has been created.

@matsduf matsduf added the S-ReleaseTested Status: The PR has been successfully tested in release testing label Dec 16, 2022
@tgreenx tgreenx deleted the patch#1100 branch January 31, 2023 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-ReleaseTested Status: The PR has been successfully tested in release testing T-Bug Type: Bug in software or error in test case description V-Patch Versioning: The change gives an update of patch in version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is cached data handled incorrectly when processing an undelegated test?
2 participants