]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
location-importer.in: reduce log noise for unusable networks
authorPeter Müller <peter.mueller@ipfire.org>
Sat, 16 Jan 2021 18:09:39 +0000 (19:09 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 25 Jan 2021 21:28:53 +0000 (21:28 +0000)
These are nothing to worry about, which is why debug log facility is
more suitable here than informational or warning.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/location-importer.in

index 1a025bb1005976d0d5128c863ebc791b00ca076d..25069250135666a2f1c206e60695f4f3c5bfede0 100644 (file)
@@ -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":