Skip to content

Return first IP in network with NetworksWithin #140

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

Merged
merged 3 commits into from
Jun 28, 2024
Merged

Conversation

oschwald
Copy link
Owner

Previously, if the network being looked up was more specific than the network
in the database, the network number would be set to the network number of the
network being looked up rather than it being placed in canonical form.

oschwald added 2 commits June 28, 2024 07:37
when looking up a network that is more specific than the network in the
database using NetworksWithin.

Previously, the network number would be set to the network number of the
provided *net.IPNet. This changes it to the canonical form.
Copy link
Collaborator

@horgh horgh left a comment

Choose a reason for hiding this comment

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

👍

traverse_test.go Outdated
@@ -71,20 +73,50 @@ var tests = []networkTest{
},
},
{
// This is intentially in non-canonical form to test
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Intentionally"?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks! I force pushed with that fixed.

@oschwald oschwald force-pushed the greg/fix-networks-within branch from 9c77193 to b2df6c3 Compare June 28, 2024 17:22
@horgh horgh merged commit 616cde2 into main Jun 28, 2024
9 checks passed
@horgh horgh deleted the greg/fix-networks-within branch June 28, 2024 17:36
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

Successfully merging this pull request may close these issues.

2 participants