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 the LOC record #310

Merged
merged 70 commits into from
Jul 26, 2022
Merged

Add the LOC record #310

merged 70 commits into from
Jul 26, 2022

Conversation

RyanGibb
Copy link
Contributor

@RyanGibb RyanGibb commented Apr 26, 2022

See rfc1876

Copy link
Member

@avsm avsm left a comment

Choose a reason for hiding this comment

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

Have had a first read through, and the overall approach looks good to me. Thanks for the PR @RyanGibb! Need to test it out and look through the RFC before a full approval. Some more eyes on this welcome @mirage/core

src/dns.ml Outdated Show resolved Hide resolved
src/dns.mli Outdated Show resolved Hide resolved
@hannesm
Copy link
Member

hannesm commented May 3, 2022

Thanks for your PR, would you mind to add some tests into tests/test.mlcovering both successful packet decoding and unsuccessful packet decoding? Also for encoding the packet... Take a brief look at that test module, it should be pretty straightforward to add that.

About the zone file parsing, there aren't many tests yet -- maybe add some to server.ml.

@RyanGibb
Copy link
Contributor Author

RyanGibb commented May 3, 2022

Yes, sure!

src/dns.ml Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.mli Show resolved Hide resolved
@hannesm
Copy link
Member

hannesm commented Jul 26, 2022

thank you for your contribution. I added minor comments and suggestions above. IMHO this is mostly ready for being merged.

Co-authored-by: Hannes Mehnert <hannes@mehnert.org>
@RyanGibb
Copy link
Contributor Author

Thank you for the suggestions, and for all the help getting this here!

src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
src/dns.ml Outdated Show resolved Hide resolved
@hannesm
Copy link
Member

hannesm commented Jul 26, 2022

sorry, in #314 I decided it doesn't make much sense to define int_compare / int32_compare in dns.ml, and got rid of it.

@hannesm hannesm merged commit 3a500ee into mirage:main Jul 26, 2022
@hannesm
Copy link
Member

hannesm commented Jul 26, 2022

CI is green, I squash-merged.

hannesm added a commit to hannesm/opam-repository that referenced this pull request Jul 26, 2022
…er, dns-mirage, dns-client, dns-cli and dns-certify (6.3.0)

CHANGES:

* dns-server: demote log level for various messages (mirage/ocaml-dns#309 @hannesm)
* dns-zone: add additional glue: only add if authoritative for nameserver domain
  (mirage/ocaml-dns#309 @hannesm)
* BUGFIX: dns-trie: fix lookup when delegations are present, add tests
  (mirage/ocaml-dns#309 @hannesm)
* ozone: be more explicit when showing errors (mirage/ocaml-dns#311 @psafont)
* dns: avoid polymorphic comparison (mirage/ocaml-dns#314 @hannesm, reported by @RyanGibb)
* FEATURE: dns: add LOC resource records (RFC 1876) (mirage/ocaml-dns#310 @RyanGibb)
hannesm added a commit to hannesm/ocaml-dns that referenced this pull request Feb 27, 2023
hannesm added a commit that referenced this pull request Feb 27, 2023
Certain character (and character sequences) were not allowed in the domain name on the left in a zone file since the lexer created tokens that were not accepted by the parser (missing in the `keyword_or_number` rule):
- N S E W (since #310)
- -<number> (NEG_NUMBER, also since #310)
- <number>m (METERS, also since #310)
- DS (since #290)
- CAA (since the beginning of this development)
- TYPEYYY (since the beginning of this development)

Also add test cases and an explanatory comment to keep Dns_zone_parser.keyword_or_number and Dns_zone_lexer.kw_or_cs synchronised.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants