From patchwork Sat Jan 16 18:09:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 3810 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4DJ5fw4LsZz3wsQ for ; Sat, 16 Jan 2021 18:09:44 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4DJ5fw0sxSzkg; Sat, 16 Jan 2021 18:09:44 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4DJ5fv6Y4Xz2xlB; Sat, 16 Jan 2021 18:09:43 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4DJ5fs6mqzz2xdM for ; Sat, 16 Jan 2021 18:09:41 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4DJ5fr5RSDzkg for ; Sat, 16 Jan 2021 18:09:40 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1610820581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8rXnKvzCi3RdRo7+6a7k+2D07qUXn/WnY/SDITyunzg=; b=4YckKOcXFi7n12ZZTlD3orV3VOdPjvMJVgwwV9SV9Q+3GWH224tGicc2hP83mrbHglvaGn 1LfEfygoFPTDUpDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1610820581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8rXnKvzCi3RdRo7+6a7k+2D07qUXn/WnY/SDITyunzg=; b=glSdxOurwlSZiCGUi8w2pL6zRSM24TmaardPjUKrZ9ulka0Otg1m7ahPzkGcGVZ30y/bpA u4yBt1yyPC3RGl0ytTPDuOf8gxmFVR1Iek+1JrETTK6fDswYIh4PTOVK55ZHHbbUbbQVbK FuTizbFA7p2alFtCOl/0dEaqifqrnqkyWgwpS64olqpXKukgIW/sFIKg/Jsm3vEidQbuK6 zJXOgtrREQoZy8qlh4UUw0RY8L2UcsbeYtZnyas3RpL0LuzRBCa/ENG8x+JQu3NYwUCsPQ /xraZlTxfz9vITTf6pSIJrShKEiBsh5fl/70c1CvHzTkeQvqDCVVD9oDdRomhA== To: location@lists.ipfire.org From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH] location-importer.in: reduce log noise for unusable networks Message-ID: <42bc8670-24ec-e10f-fce8-2a1452d26420@ipfire.org> Date: Sat, 16 Jan 2021 19:09:39 +0100 MIME-Version: 1.0 Content-Language: en-US X-BeenThere: location@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: location-bounces@lists.ipfire.org Sender: "Location" 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 --- src/python/location-importer.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/python/location-importer.in b/src/python/location-importer.in index a4be445..c5ebb54 100644 --- a/src/python/location-importer.in +++ b/src/python/location-importer.in @@ -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":