public inbox for location@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH] location-importer: Improve regex for catching historic/orphaned data
@ 2021-12-12  9:05 Peter Müller
  0 siblings, 0 replies; only message in thread
From: Peter Müller @ 2021-12-12  9:05 UTC (permalink / raw)
  To: location

[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]

This silences a bunch of warnings due to allocations at APNIC having
country code set to "ZZ", which are completely irrelevant to us.

Signed-off-by: Peter Müller <peter.mueller(a)ipfire.org>
---
 src/python/location-importer.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/python/location-importer.in b/src/python/location-importer.in
index b791b4d..b066ac6 100644
--- a/src/python/location-importer.in
+++ b/src/python/location-importer.in
@@ -671,7 +671,7 @@ class CLI(object):
 			# Filter any inetnum records which are only referring to IP space
 			# 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()):
+				if re.match(r"^(ERX-NETBLOCK|(AFRINIC|ARIN|LACNIC|RIPE)-CIDR-BLOCK|IANA-NETBLOCK-\d{1,3}|NON-RIPE-NCC-MANAGED-ADDRESS-BLOCK|STUB-[\d-]{3,}SLASH\d{1,2})", val.strip()):
 					log.debug("Skipping record indicating historic/orphaned data: %s" % val.strip())
 					return
 
-- 
2.26.2

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-12  9:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-12  9:05 [PATCH] location-importer: Improve regex for catching historic/orphaned data Peter Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox