Commit 378b4c0a authored by Peter Müller's avatar Peter Müller Committed by Michael Tremer

location-import.in: optimise regular expression for filtering ASN allocations...

location-import.in: optimise regular expression for filtering ASN allocations to other RIRs when parsing ARIN AS names file

https://lists.ipfire.org/pipermail/location/2021-June/000394.htmlReported-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
Signed-off-by: default avatarPeter Müller <peter.mueller@ipfire.org>
Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 87779e52
......@@ -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...
......
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