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

Performing moveTo with x.0.0.0 subnets fails consistently #50

Open
MetroConductor opened this issue Dec 1, 2024 · 0 comments
Open

Performing moveTo with x.0.0.0 subnets fails consistently #50

MetroConductor opened this issue Dec 1, 2024 · 0 comments

Comments

@MetroConductor
Copy link

Problem description:
When parsing a x.0.0.0 network address, in example 240.0.0.0/4, calling Network::moveTo() causes an exception.

Steps to reproduce:

  1. Create a network using Network::parse, ie.: $network = Network::parse('240.0.0.0/4');
  2. Call moveTo with a higher prefix length, ie.: $network->moveTo(5);

Desired result:
An array with two Networks should be returned.

Actual result:
In most cases, a IpException is thrown with the following message: "Invalid IP address format"

Additional info:
This behaviour can be observed for most x.0.0.0 networks, especially with a prefix length smaller than 8. Attached you will find my test script, detailing the failings: iptools_network_test.zip

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

No branches or pull requests

1 participant