From 378b4c0a036d521cc993bde31121ae2bd77167c8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20M=C3=BCller?= Date: Sun, 20 Jun 2021 12:43:07 +0200 Subject: [PATCH] location-import.in: optimise regular expression for filtering ASN allocations to other RIRs when parsing ARIN AS names file MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit https://lists.ipfire.org/pipermail/location/2021-June/000394.html Reported-by: Michael Tremer Signed-off-by: Peter Müller Signed-off-by: Michael Tremer --- 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 b235db7..ff90d91 100644 --- a/src/python/location-importer.in +++ b/src/python/location-importer.in @@ -811,7 +811,7 @@ class CLI(object): continue # Skip any AS name that appears to be a placeholder for a different RIR or entity... - if re.match(r"^(ASN-BLK|)(AFCONC|AFRINIC|APNIC|ASNBLK|DNIC|LACNIC|RIPE|IANA)(\d?$|\-.*)", name): + if re.match(r"^(ASN-BLK|)(AFCONC|AFRINIC|APNIC|ASNBLK|DNIC|LACNIC|RIPE|IANA)(?:\d?$|\-)", name): continue # Bail out in case the AS name contains anything we do not expect here... -- 2.39.2