Skip to content

Method to get name server names from undelegated data cache#1214

Merged
tgreenx merged 1 commit intozonemaster:developfrom
tgreenx:add-fake-names
Apr 12, 2023
Merged

Method to get name server names from undelegated data cache#1214
tgreenx merged 1 commit intozonemaster:developfrom
tgreenx:add-fake-names

Conversation

@tgreenx
Copy link
Contributor

@tgreenx tgreenx commented Apr 11, 2023

Purpose

This PR proposes a new method to fetch name server names from the undelegated data cache.

Context

Necessary for #1050

Changes

  • New method get_fake_names in Zonemaster::Engine::Recursor
  • Documentation

How to test this PR

$ perl -MZonemaster::Engine -E 'say "\n", join "\n", Zonemaster::Engine::Recursor->add_fake_addresses("zonemaster.net", {"fake.ns1.zonemaster.net" => ["10.0.0.1"], "fake.ns2.zonemaster.net" => ["10.0.0.2"] }), Zonemaster::Engine::Recursor->get_fake_names("zonemaster.net")'

fake.ns2.zonemaster.net
fake.ns1.zonemaster.net

@tgreenx tgreenx added T-Feature Type: New feature in software or test case description V-Minor Versioning: The change gives an update of minor in version. labels Apr 11, 2023
@tgreenx tgreenx added this to the v2023.1 milestone Apr 11, 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.

@matsduf
Copy link
Contributor

matsduf commented Apr 12, 2023

I do not see any issues of adding that code, since it is not used. What is the use case for the new method? The method only returns the name server names, not any addresses connected to those names. Is that not of interest too?

@tgreenx
Copy link
Contributor Author

tgreenx commented Apr 12, 2023

I do not see any issues of adding that code, since it is not used. What is the use case for the new method? The method only returns the name server names, not any addresses connected to those names. Is that not of interest too?

There is already a method to fetch name servers addresses from the undelegated data cache (Zonemaster::Engine::Recursor->get_fake_addresses).

This one is needed for this part in MethodsV2. It seems to be needed only once, and you can see its usage here.

@matsduf
Copy link
Contributor

matsduf commented Apr 12, 2023

Now I see the usage for MethodsV2.

@tgreenx tgreenx merged commit 7991ecf into zonemaster:develop Apr 12, 2023
@tgreenx tgreenx deleted the add-fake-names branch April 12, 2023 16:01
@matsduf matsduf added V-Patch Versioning: The change gives an update of patch 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-Patch Versioning: The change gives an update of patch in version. labels May 15, 2023
@hannaeko hannaeko self-assigned this Jun 1, 2023
@hannaeko hannaeko added the S-ReleaseTested Status: The PR has been successfully tested in release testing label Jun 1, 2023
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-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.

4 participants