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

PoC: Send queries with EDNS option NSID set and retrieve the value if available #1133

Closed
wants to merge 6 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 28, 2022

Purpose

This PR is about validating that Zonemaster can retrieve and display NSID values from nameservers if available.

Question

Currently this PR sets the EDNS option NSID to all queries. Should this option be sent only to nameservers that support EDNS (look for the results from Nameserver02)?

Todo

  • address the question asked above
  • make sure that this EDNS option does not interfere with other tests.

Context

Addresses #178 and follow-up on zonemaster/zonemaster-ldns#151

Changes

  • some refactoring
  • display libldns version as DEBUG
  • always set the EDNS option NSID to all queries
  • store the NSID (if available) whithin the Nameserver object
  • append the NSID to the ns/ip tuple resulting in ns/ip/nsid

How to test this PR

This requires libldns >= 1.8.2 and Zonemaster-LDNS from zonemaster/zonemaster-ldns#151

$ zonemaster-cli --test basic --level INFO  zonemaster.net
Seconds Level     Message
======= ========= =======
   0.00 INFO      Using version v4.5.1 of the Zonemaster engine.
   0.27 INFO      Parent domain 'net' was found for the tested domain.
   1.39 INFO      Nameserver ns2.nic.fr/192.93.0.4/ns2.th2.nic.fr listed these servers as glue: ns2.nic.fr.,nsa.dnsnode.net.,nsp.dnsnode.net.,nsu.dnsnode.net..
   1.40 INFO      Nameserver ns2.nic.fr/2001:660:3005:1::1:2/ns2.th2.nic.fr listed these servers as glue: ns2.nic.fr.,nsa.dnsnode.net.,nsp.dnsnode.net.,nsu.dnsnode.net..
   1.40 INFO      Nameserver nsa.dnsnode.net/194.58.192.46/s4.bnx listed these servers as glue: ns2.nic.fr.,nsa.dnsnode.net.,nsp.dnsnode.net.,nsu.dnsnode.net..
   1.40 INFO      Nameserver nsa.dnsnode.net/2a01:3f1:46::53/s4.bnx listed these servers as glue: ns2.nic.fr.,nsa.dnsnode.net.,nsp.dnsnode.net.,nsu.dnsnode.net..
   1.41 INFO      Nameserver nsp.dnsnode.net/194.58.198.32/s4.bnx listed these servers as glue: ns2.nic.fr.,nsa.dnsnode.net.,nsp.dnsnode.net.,nsu.dnsnode.net..
   1.41 INFO      Nameserver nsp.dnsnode.net/2a01:3f1:3032::53/s4.bnx listed these servers as glue: ns2.nic.fr.,nsa.dnsnode.net.,nsp.dnsnode.net.,nsu.dnsnode.net..
   1.41 INFO      Nameserver nsu.dnsnode.net/185.42.137.98/u4.sub listed these servers as glue: ns2.nic.fr.,nsa.dnsnode.net.,nsp.dnsnode.net.,nsu.dnsnode.net..
   1.41 INFO      Nameserver nsu.dnsnode.net/2a01:3f0:400::32/u4.stu listed these servers as glue: ns2.nic.fr.,nsa.dnsnode.net.,nsp.dnsnode.net.,nsu.dnsnode.net..
   1.41 INFO      Functional nameserver found. "A" query for www.zonemaster.net test skipped.

See the tuple nsp.dnsnode.net/2a01:3f1:3032::53/s4.bnx which is made of the nameserver name, the nameserver IP and the nameserver NSID.

If there is no NSID, the output would be unchanged:

$ zonemaster-cli --test basic --level INFO café.fr
Seconds Level     Message
======= ========= =======
   0.00 INFO      Using version v4.5.1 of the Zonemaster engine.
   0.48 INFO      Parent domain 'fr' was found for the tested domain.
   0.92 INFO      Nameserver ns1.parkingcrew.net/13.248.158.159 listed these servers as glue: ns1.parkingcrew.net.,ns2.parkingcrew.net..
   0.92 INFO      Nameserver ns2.parkingcrew.net/76.223.21.9 listed these servers as glue: ns1.parkingcrew.net.,ns2.parkingcrew.net..
   0.92 INFO      Functional nameserver found. "A" query for www.xn--caf-dma.fr test skipped.

@ghost ghost added the T-Feature Type: New feature in software or test case description label Sep 28, 2022
@ghost ghost added this to the v2022.2 milestone Sep 28, 2022
@matsduf
Copy link
Contributor

matsduf commented Sep 28, 2022

The specification of the DNS query says that it should by default be without EDNS ("DNS Query and Response Defaults").

Copy link
Contributor

@matsduf matsduf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If ENDS should be used or not is a matter for the test case. This should start with the specification.

@matsduf matsduf modified the milestones: v2022.2, v2023.1 Nov 8, 2022
@matsduf matsduf modified the milestones: v2023.1, v2023.2 May 2, 2023
@tgreenx tgreenx linked an issue Jul 26, 2023 that may be closed by this pull request
@ghost
Copy link
Author

ghost commented Sep 7, 2023

Won't be implemented as it is. We decided (during F2F 2023-09-07) to start with a test case that will query for the NSID (see zonemaster/zonemaster#1205).
At this point there is no decision in retrieving the NSID with all Zonemaster queries.

@ghost ghost closed this Sep 7, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Feature Type: New feature in software or test case description
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add NSID to queries and log results
1 participant