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

Expand DNAME support #170

Merged
merged 2 commits into from
Apr 5, 2023
Merged

Expand DNAME support #170

merged 2 commits into from
Apr 5, 2023

Conversation

tgreenx
Copy link
Contributor

@tgreenx tgreenx commented Mar 7, 2023

Purpose

This PR expands the functionality of DNAME resource records by giving access to its RDATA.

Context

Necessary for zonemaster/zonemaster-engine#568

Relates to zonemaster/zonemaster#1075 and zonemaster/zonemaster#472

Changes

  • New method dname() in LDNS::RR::DNAME
  • Unitary test

How to test this PR

Unit tests should pass

- Allow access to DNAME RR
- Add unitary test
@tgreenx tgreenx added S-PRforIssue Status: There is a PR that is meant to resolve the issue V-Minor Versioning: The change gives an update of minor in version. labels Mar 7, 2023
@tgreenx tgreenx added this to the v2023.1 milestone Mar 7, 2023
marc-vanderwal
marc-vanderwal previously approved these changes Mar 9, 2023
Copy link
Contributor

@marc-vanderwal marc-vanderwal left a comment

Choose a reason for hiding this comment

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

Looks good to me.

=cut
=item dname()

Returns the delegation name.
Copy link
Contributor

Choose a reason for hiding this comment

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

It is clearer to say the RDATA of a DNAME record.

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

MODULE = Zonemaster::LDNS PACKAGE = Zonemaster::LDNS::RR::DNAME PREFIX=rr_dname_

char *
rr_dname_dname(obj)
Copy link

Choose a reason for hiding this comment

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

suggestion: name the method target instead, as it seems to be the given name of the RDATA RFC 6672 section 2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Considering how we use such methods in Engine, I would prefer to keep them this way. However I have clarified the documentation to account for that technicality. Is that fine for you?

Copy link

Choose a reason for hiding this comment

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

Oh I understand. This is totally fine then.

@tgreenx tgreenx removed the S-PRforIssue Status: There is a PR that is meant to resolve the issue label Mar 13, 2023
- Clarify documentation of method 'Zonemaster::LDNS::RR::DNAME::dname()'
=cut
=item dname()

Returns the delegation name, i.e. the <target> field from the RDATA of a DNAME record.
Copy link
Contributor

@matsduf matsduf Mar 14, 2023

Choose a reason for hiding this comment

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

The RDATA only consists of the target so "from the RDATA" sounds strange. There is only one field to fetch. Maybe

Returns the delegation name, i.e. the DNAME record target (RDATA).

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.

I have a comment, but not very important.

@tgreenx tgreenx merged commit 585523d into zonemaster:develop Apr 5, 2023
@tgreenx tgreenx deleted the update-dname branch April 5, 2023 12:54
@tgreenx tgreenx added V-Major Versioning: The change gives an update of major in version. V-Minor Versioning: The change gives an update of minor in version. and removed V-Minor Versioning: The change gives an update of minor in version. V-Major Versioning: The change gives an update of major in version. labels Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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