]> git.ipfire.org Git - location/libloc.git/commitdiff
location-importer.in: Braindead me accidentally forgot a "break" statement
authorPeter Müller <peter.mueller@ipfire.org>
Sun, 8 Aug 2021 21:31:58 +0000 (23:31 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 11 Aug 2021 10:04:41 +0000 (10:04 +0000)
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>
src/python/location-importer.in

index bec0b6299ebf8259549b44de759ef549a2f5f0f8..da058d36319a7c71a200227fd04a05772bc39ee2 100644 (file)
@@ -702,6 +702,7 @@ class CLI(object):
                                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) \