-
Notifications
You must be signed in to change notification settings - Fork 33
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
Profile fixes #1356
Profile fixes #1356
Conversation
lib/Zonemaster/Engine/Profile.pm
Outdated
if ( $_[0] ne $RESOLVER_SOURCE_OS_DEFAULT and not Net::IP::XS->new( $_[0] ) ) { | ||
die "Property resolver.source must be an IP address or the exact string $RESOLVER_SOURCE_OS_DEFAULT"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see Net::IP::XS->new( "10.0.1/24" )
is true.
True. I'd prefer if we could merge these two PRs in any order though, and whoever comes in second place gets to rebase. Is that okay with you? |
The profile module specifies a contract that each profile property must respect. This change makes all properties respect the contract with regard to definedness, default values and hierarchy. To ease upholding certain aspects of the contract the new utility method all_properties() was added. Validation error messages for resolver.source4 and resolver.source6 are clarified regarding the empty string.
ff0984d
to
5f5edfb
Compare
There was a problem hiding this 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good for me
Purpose
The initial aim of this PR was to add some missing properties to the default profile. But in the process of making the update I discovered more problems with the profile and I'm including fixes for all of them here.
Context
Fixes #1355.
Conflicts but is not blocked by #1257.
I marked this minor because of the new Zonemaster::Engine::Profile->all_properties method. Otherwise this would be V-Patch.
Changes
cache
asnroots
cache
resolver.source4
resolver.source6
How to test this PR
Run the unit tests.