This one apparently went down the drain between these two patches:
- https://patchwork.ipfire.org/project/location/patch/
20210522125758.28770-1-peter.mueller@ipfire.org/
- https://patchwork.ipfire.org/project/location/patch/
aefd1904-4b38-f5cf-ab1d-
9d69636cf914@ipfire.org/
Due to other safeguards, the current damage in production is limited to:
location=# SELECT * FROM networks WHERE country = 'ZZ';
network | country | original_countries | source
--------------------+---------+--------------------+--------
130.195.64.0/19 | ZZ | {ZZ} | APNIC
130.195.96.0/19 | ZZ | {ZZ} | APNIC
122.252.24.0/21 | ZZ | {ZZ} | APNIC
2406:840:10::/48 | ZZ | {ZZ} | APNIC
2406:840:fd0f::/48 | ZZ | {ZZ} | APNIC
(5 rows)
Fixes: #12673
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
if validcountries and invalidcountries:
log.warning("Skipping network with bogus countr(y|ies) %s (original countries: %s): %s" % \
(invalidcountries, inetnum.get("country"), inetnum.get("inet6num") or inetnum.get("inetnum")))
+ break
# Everything is fine here, run INSERT statement...
self.db.execute("INSERT INTO _rirdata(network, country, original_countries, source) \