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
Handle adjacent prefixes in ipinfo tool aggregate #193
Handle adjacent prefixes in ipinfo tool aggregate #193
Conversation
BE-2715 Handle adjacent prefixes in `ipinfo tool aggregate`
Ref #187
The tool ignores the adjacent prefixes, doesn't optimize them. We should combined adjacent prefixes under a single, shorter-length prefix, for example, for the above it should show: cc uman |
Turns out we already had an internal implementation here, using it. Comparing result with another tool.
|
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.
We should move all this generic CIDR code into lib/cidr.go
or something?
3a82aba
to
2aedf33
Compare
@talhahwahla in the example you gave, the Ipv6 entry disappears. Intended? |
@UmanShahzad yes, accepting and aggregating the Ipv4 only. Alternative is to print the Ipv6 as it is, which I guess might be confusing. |
In #187, we identified that
ipinfo tool aggregate
does not work for adjacent CIDRs.Checking adjacency based on two conditions:
This works for IPv4 only.