Skip to content

[Issue] IPv6 approximate aggregation is broken #337

@g00g1

Description

@g00g1

Describe the bug

$ echo "2001:db8:eb5a:1c8a:7fd8:fc5f:3c71:b3f6
2001:db8:eb5a:2d79:4ba2:3f33:aaa5:b78
2001:db8:eb5a:2e91:a11b:39df:37a7:2d44
2001:db8:eb5a:2fab:944e:a1f0:3825:1cc1
2001:db8:eb5a:3c2b:db3b:44db:77b:a8d3
2001:db8:eb5a:3f14:a08:5787:43e5:54b2
2001:db8:eb5a:4b17:e65b:547c:589d:f580
2001:db8:eb5a:4b43:7813:4492:3430:88fe" \
| /usr/local/bin/mapcidr -aa -silent

Produces

2001:db8:eb5a:1c8a:7fd8:fc5f:3c71:b3f6/128

Normal aggregation behaves correctly:

$ echo "2001:db8:eb5a:1c8a:7fd8:fc5f:3c71:b3f6
2001:db8:eb5a:2d79:4ba2:3f33:aaa5:b78
2001:db8:eb5a:2e91:a11b:39df:37a7:2d44
2001:db8:eb5a:2fab:944e:a1f0:3825:1cc1
2001:db8:eb5a:3c2b:db3b:44db:77b:a8d3
2001:db8:eb5a:3f14:a08:5787:43e5:54b2
2001:db8:eb5a:4b17:e65b:547c:589d:f580
2001:db8:eb5a:4b43:7813:4492:3430:88fe" \
| /usr/local/bin/mapcidr -a -silent

Produces

2001:db8:eb5a:1c8a:7fd8:fc5f:3c71:b3f6/128
2001:db8:eb5a:2d79:4ba2:3f33:aaa5:b78/128
2001:db8:eb5a:2e91:a11b:39df:37a7:2d44/128
2001:db8:eb5a:2fab:944e:a1f0:3825:1cc1/128
2001:db8:eb5a:3c2b:db3b:44db:77b:a8d3/128
2001:db8:eb5a:3f14:a08:5787:43e5:54b2/128
2001:db8:eb5a:4b17:e65b:547c:589d:f580/128
2001:db8:eb5a:4b43:7813:4492:3430:88fe/128

Mapcidr version
Include the version of mapcidr you are using, mapcidr -version


                   ____________  ___    
  __ _  ___ ____  / ___/  _/ _ \/ _ \   
 /  ' \/ _ '/ _ \/ /___/ // // / , _/   
/_/_/_/\_,_/ .__/\___/___/____/_/|_|
          /_/                                                     	 

		projectdiscovery.io

[INF] Current Version: v1.1.16

Screenshots

Not applicable

Metadata

Metadata

Assignees

Labels

Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions