There is an issue when aggregating a large volume of subnets which causes a null pointer panic
This though does not occur when using Python's standard library to collapse addresses.
Converting subnets to Prefixes
Aggregating subnets
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x10b2f1a]
goroutine 1 [running]:
github.com/mikioh/ipaddr.aggregateByBF(0xc000694000, 0x19233, 0x19233, 0x1283ef8, 0x1283f08, 0x4, 0x19233, 0x19233)
/Users/kkirsche/git/go/pkg/mod/github.com/mikioh/[email protected]/prefix.go:329 +0x69a
github.com/mikioh/ipaddr.Aggregate(0xc000694000, 0x19233, 0x19233, 0x1, 0x1, 0x14)
/Users/kkirsche/git/go/pkg/mod/github.com/mikioh/[email protected]/prefix.go:302 +0x103
main.main()
/Users/kkirsche/git/go/src/github.com/kkirsche/ipaddr-aggregation-error/main.go:27 +0x18a
exit status 2
I've created a repository with a python and a go version showing that one works and one does not.