]>
git.ipfire.org Git - location/libloc.git/commit
export: Flatten the tree before exporting it
This patch removes the possibility that any IP address ranges
might show up in multiple exported files.
If this was content from the database:
* 10.0.0.0/16 - DE
* 10.0.1.0/24 - FR
Then the IP address 10.0.1.1 would match for both countries.
The algorithm will now break the larger /16 subnet apart into
smaller subnets so that 10.0.1.0/24 is no longer overlapped.
There was some time spent on this to make this as efficient
as possible.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>