Both the Bouvet Island (BV) and Antarctica (AQ) are unpopulated at the time of writing. Network owners/operators putting these countries into their RIR data objects are either completely braindead or doing so for hostile reasons.
While we might correct these locations to something useful by manually creating overrides for them, the rationale behind this patch is not to let these countries appear on productive systems in the first place, as we know they _cannot_ be true.
Therefore, this patch skips any network object that has either AQ or BV country code set.
See also: https://lists.ipfire.org/pipermail/location/2020-October/000199.html
Signed-off-by: Peter Müller peter.mueller@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 1e08458..ac678dc 100644 --- a/src/python/location-importer.in +++ b/src/python/location-importer.in @@ -624,7 +624,7 @@ class CLI(object): return
# Skip objects with unknown country codes - if validcountries and inetnum.get("country") not in validcountries: + if validcountries and (inetnum.get("country") not in validcountries or inetnum.get("country") in ["AQ", "BV"]): log.warning("Skipping network with bogus country '%s': %s" % \ (inetnum.get("country"), inetnum.get("inet6num") or inetnum.get("inetnum"))) return