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

New options "--sourceaddr4" and "--sourceaddr6" #317

Merged
1 commit merged into from Mar 21, 2023
Merged

New options "--sourceaddr4" and "--sourceaddr6" #317

1 commit merged into from Mar 21, 2023

Conversation

ghost
Copy link

@ghost ghost commented Mar 13, 2023

Purpose

Provide options to define both source IPv4 and source IPv6. This would replace the --sourceaddr option.

Context

#315
Follow-up on zonemaster/zonemaster-engine#1203

Changes

  • New options "--sourceaddr4" and "--sourceaddr6"
  • Deprecate "--sourceaddr".

How to test this PR

zonemaster-cli --sourceaddr <IP address> bzh # should emit a deprecation message
zonemaster-cli --sourceaddr4 <IPv4 address> berlin
zonemaster-cli --sourceaddr6 <IPv6 address> tokyo

@ghost ghost added this to the v2023.1 milestone Mar 13, 2023
@ghost ghost requested review from matsduf, hannaeko, tgreenx and marc-vanderwal March 13, 2023 14:12
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.

Add a blocker so that --sourceaddr can neither be combined with --sourceaddr4 nor --sourceaddr6.

lib/Zonemaster/CLI.pm Outdated Show resolved Hide resolved
lib/Zonemaster/CLI.pm Outdated Show resolved Hide resolved
@ghost
Copy link
Author

ghost commented Mar 16, 2023

Add a blocker so that --sourceaddr can neither be combined with --sourceaddr4 nor --sourceaddr6.

Done.

Add [...] "Cannot be combined with --sourceaddr".

Done.

@ghost ghost requested a review from matsduf March 16, 2023 14:40
@matsduf
Copy link
Contributor

matsduf commented Mar 17, 2023

It should be noted that zonemaster-cli will this update will require Zonemaster::Engine updated as updated with zonemaster/zonemaster-engine#1203.

matsduf
matsduf previously approved these changes Mar 17, 2023
@matsduf matsduf added the V-Minor Versioning: The change gives an update of minor in version. label Mar 17, 2023
@ghost ghost merged commit ab33cd2 into zonemaster:develop Mar 21, 2023
@ghost ghost deleted the sourceaddr6 branch May 25, 2023 07:08
@tgreenx
Copy link
Contributor

tgreenx commented May 31, 2023

v2023.1 Release testing

Basic testing:

  • New options "--sourceaddr4" and "--sourceaddr6". --> OK
  • Deprecate "--sourceaddr". --> OK

Observations:

  • Setting a valid IPv4 address with --sourceaddr works.
  • Setting a valid IPv6 address with --sourceaddr works.
  • Setting an invalid IPv4 address with --sourceaddr fails silently.
  • Setting an invalid IPv6 address with --sourceaddr fails silently.
  • Setting a valid IPv4 address with --sourceaddr4 works.
  • Setting a valid IPv6 address with --sourceaddr6 works.
  • Setting an invalid IPv4 address with --sourceaddr4 fails silently.
  • Setting an invalid IPv6 address with --sourceaddr6 fails silently.
  • Setting a valid IPv4 address with --sourceaddr6 fails silently.
  • Setting a valid IPv6 address with --sourceaddr4 fails silently.
  • Setting an invalid IPv4 address with --sourceaddr6 fails silently.
  • Setting an invalid IPv6 address with --sourceaddr4 fails silently.
  • Any combination above using --no-ipv4 or --no-ipv6 works as expected.

@tgreenx tgreenx added the S-ReleaseTested Status: The PR has been successfully tested in release testing label May 31, 2023
This pull request was closed.
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 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.

2 participants