Commit 2ba6ed07 authored by Peter Müller's avatar Peter Müller Committed by Michael Tremer

location-importer.in: reduce log noise for unusable networks

These are nothing to worry about, which is why debug log facility is
more suitable here than informational or warning.
Signed-off-by: default avatarPeter Müller <peter.mueller@ipfire.org>
Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent b4d5b2a6
......@@ -494,12 +494,12 @@ class CLI(object):
return False
if not network.is_global:
log.warning("Skipping non-globally routable network: %s" % network)
log.debug("Skipping non-globally routable network: %s" % network)
return False
if network.version == 4:
if network.prefixlen < 7:
log.warning("Skipping too big IP chunk: %s" % network)
log.debug("Skipping too big IP chunk: %s" % network)
return False
if network.prefixlen > 24:
......@@ -507,12 +507,12 @@ class CLI(object):
return False
if str(network.network_address) == "0.0.0.0":
log.warning("Skipping network based on 0.0.0.0: %s" % network)
log.debug("Skipping network based on 0.0.0.0: %s" % network)
return False
elif network.version == 6:
if network.prefixlen < 10:
log.warning("Skipping too big IP chunk: %s" % network)
log.debug("Skipping too big IP chunk: %s" % network)
return False
if network.prefixlen > 48:
......@@ -520,7 +520,7 @@ class CLI(object):
return False
if str(network.network_address) == "::":
log.warning("Skipping network based on '::': %s" % network)
log.debug("Skipping network based on '::': %s" % network)
return False
else:
......@@ -587,7 +587,7 @@ class CLI(object):
# not managed by that specific RIR...
if key == "netname":
if re.match(r"(ERX-NETBLOCK|(AFRINIC|ARIN|LACNIC|RIPE)-CIDR-BLOCK|IANA-NETBLOCK-\d{1,3}|NON-RIPE-NCC-MANAGED-ADDRESS-BLOCK)", val.strip()):
log.warning("Skipping record indicating historic/orphaned data: %s" % val.strip())
log.debug("Skipping record indicating historic/orphaned data: %s" % val.strip())
return
if key == "inetnum":
......
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