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

Add Nameserver15 implementation #1218

Merged
merged 2 commits into from
May 10, 2023
Merged

Conversation

tgreenx
Copy link
Contributor

@tgreenx tgreenx commented May 2, 2023

Purpose

This PR proposes an implementation of the newly specified Nameserver15 Test Case.

Context

zonemaster/zonemaster#1150

Changes

lib/Zonemaster/Engine/Test/Nameserver.pm + profile.json

  • Add implementation
  • Add documentation

docs/logentry_args.md

  • Update message arguments list

t/Test-nameserver15.t + t/Test-nameserver15.data

  • Add unitary tests

How to test this PR

Unit tests should pass. All message tags are covered, however note that they are not using "controlled" zones.

Also:

$ zonemaster-cli --show-testcase --test nameserver/nameserver15 zonemaster.net --level INFO
Seconds Level     Testcase       Message
======= ========= ============== =======
   0.00 INFO      UNSPECIFIED    Using version v4.6.2 of the Zonemaster engine.
   1.33 INFO      NAMESERVER15   The following name server(s) respond to software version query "version.bind" with string "9.18.13". Returned from name servers: "ns2.nic.fr/192.93.0.4;ns2.nic.fr/2001:660:3005:1::1:2"
   1.34 INFO      NAMESERVER15   The following name server(s) do not respond to software version queries. Returned from name servers: "nsa.dnsnode.net/194.58.192.46;nsa.dnsnode.net/2a01:3f1:46::53;nsp.dnsnode.net/194.58.198.32;nsp.dnsnode.net/2a01:3f1:3032::53;nsu.dnsnode.net/185.42.137.98;nsu.dnsnode.net/2a01:3f0:400::32"

@tgreenx tgreenx added T-Feature Type: New feature in software or test case description A-TestCase Area: Test case specification or implementation of test case V-Minor Versioning: The change gives an update of minor in version. labels May 2, 2023
@tgreenx tgreenx added this to the v2023.1 milestone May 2, 2023
@tgreenx
Copy link
Contributor Author

tgreenx commented May 2, 2023

Note that one unitary test has been removed, it does not seem to be a working zone anymore:

$ dig SOA flagday.rootcanary.net +noedns

; <<>> DiG 9.16.37-Debian <<>> SOA flagday.rootcanary.net +noedns
;; global options: +cmd
;; connection timed out; no servers could be reached

Edit: I have re-included that unitary test for now because I just moved the ones for Nameserver15 in a separate .t file, removing the need to update t/Test-nameserver.t and thus t/Test-nameserver.data. See this diff commit .

@tgreenx tgreenx force-pushed the add-nameserver15 branch from e20afa1 to 0f8b8c5 Compare May 3, 2023 15:50
@tgreenx tgreenx force-pushed the add-nameserver15 branch from 0f8b8c5 to 802ea56 Compare May 3, 2023 15:51
hannaeko
hannaeko previously approved these changes May 9, 2023
Copy link
Member

@hannaeko hannaeko left a comment

Choose a reason for hiding this comment

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

It works as excepted from what I can see.

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.

Some minor comments, but in general it looks fine, but I have to test too.

@@ -68,10 +68,12 @@ and updated messages (*msgids* and *msgstr*).
| ns_list | List of domain name and IP address pairs | A list of name servers, as specified by "ns", separated by ";". |
| nsname | Domain name | The domain name of a name server. |
| nsname_list | List of domain names | A list of name servers, as specified by "nsname", separated by ";". |
| query_name | Text | A query domain name (QNAME), as defined in [RFC1035, section 4.1.2]. |
Copy link
Contributor

Choose a reason for hiding this comment

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

This is text in the same way as nsname is text, but the latter is restricted text. I think it is better to say that it is a Domain name. Another possibility is to say that the argument is a domain and do not define a new argument name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

| rcode | An RCODE Name | An RCODE Name (not numeric code) from [DNS RCODEs]. |
| rrtype | A Resource Record TYPE Name | A Resource Record TYPE Name (not numeric code) from [DNS RR TYPEs]. |
| soaserial | Non-negative integer | The numeric value for the SERIAL field in an SOA record. Integer in range 0-4,294,967,295 |
| soaserial_list | List of non-negative integers | A list of non-negative integers, as specified by "soaserial", separated by ";". |
| string | Text | The content of the RDATA of a TXT ressource record. |
Copy link
Contributor

Choose a reason for hiding this comment

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

"resource" is misspelled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@@ -149,5 +151,6 @@ Message names maked with a question mark should not be considered stable.
[DNSSEC algorithm]: https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml
[DS Digest algorithm]: https://www.iana.org/assignments/ds-rr-types/ds-rr-types.xhtml
[fr.po]: ../share/fr.po
[RFC1035, section 4.1.2]: https://datatracker.ietf.org/doc/html/rfc1035#section-4.1.2
[sv.po]: ../share/fr.po
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you fix the typo here (not from this PR): ../share/fr.po --> ../share/sv.po

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@tgreenx tgreenx merged commit aec4b22 into zonemaster:develop May 10, 2023
@tgreenx tgreenx deleted the add-nameserver15 branch May 10, 2023 13:14
@tgreenx tgreenx mentioned this pull request May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-TestCase Area: Test case specification or implementation of test case T-Feature Type: New feature in software or test case description V-Minor Versioning: The change gives an update of minor in version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants