Commit a3140aa9 authored by Michael Tremer's avatar Michael Tremer

export: Enable flattening for everything

When performing checks, it is useful to be able to rely on a flat
network plan so that any larger parent networks in some countries/ASes
won't match any subnets.
Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 643b8d06
......@@ -44,9 +44,6 @@ class OutputWriter(object):
suffix = "networks"
mode = "w"
# Enable network flattening (i.e. networks cannot overlap)
flatten = False
def __init__(self, name, family=None, directory=None, f=None):
self.name = name
self.family = family
......@@ -211,7 +208,6 @@ class XTGeoIPOutputWriter(OutputWriter):
the xt_geoip kernel module from xtables-addons.
"""
mode = "wb"
flatten = True
@property
def tag(self):
......@@ -258,7 +254,7 @@ class Exporter(object):
# Get all networks that match the family
networks = self.db.search_networks(family=family,
country_codes=country_codes, asns=asns, flatten=self.writer.flatten)
country_codes=country_codes, asns=asns, flatten=True)
# Walk through all networks
for network in networks:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment