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: Michael Tremer <michael.tremer@ipfire.org>
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
the xt_geoip kernel module from xtables-addons.
"""
mode = "wb"
- flatten = True
@property
def tag(self):
# 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: