]> git.ipfire.org Git - location/libloc.git/commit
export: Skip writing any subnets
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 18 Sep 2020 10:26:15 +0000 (10:26 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 18 Sep 2020 13:10:51 +0000 (13:10 +0000)
commit43554dc4659cbb0d4c477fbff69cfbb5f21e4f13
tree273033583a46a6139db59ce6bc875f7419393052
parentf869f1052f1037470a8cc0237130ff3df671c4fe
export: Skip writing any subnets

It is unnecessary to write any subnets in the output, because
they might already be included in a bigger parent network.

Since the tree is ordered, we only need to check if the network
to be written is a subnet of the previous one. If so, we skip it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libloc.sym
src/loc/network.h
src/network.c
src/python/export.py
src/python/network.c
src/test-network.c