Message ID | 881acb1f-a618-bd5c-2a78-0d869122c30a@ipfire.org |
---|---|
State | Accepted |
Commit | 48770ca84d206e8f4693c1d835da4fba97f3031b |
Headers |
Return-Path: <location-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4GjXVH4T59z3xGN for <patchwork@web04.haj.ipfire.org>; Sun, 8 Aug 2021 21:32:07 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4GjXVG746wzx; Sun, 8 Aug 2021 21:32:06 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4GjXVG3238z2xfm; Sun, 8 Aug 2021 21:32:06 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4GjXVD2NJKz2xWS for <location@lists.ipfire.org>; Sun, 8 Aug 2021 21:32:04 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4GjXVB66GPzx for <location@lists.ipfire.org>; Sun, 8 Aug 2021 21:32:02 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1628458323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JahElloMt2ETCrUUOfrWKAJrCyLXq1uN2hjf3V7x9ns=; b=iqk2ZBbryCXCciJE/6CU/6zFRQVeBrDiOjJJfnBTRTcOxlrNx0oIWH2Jv6DvQPemam91kc a8YCoQzyIcYAbjDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1628458323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JahElloMt2ETCrUUOfrWKAJrCyLXq1uN2hjf3V7x9ns=; b=T/s35kKuVs+2yR3+PzOSinQy9FoBVg+0Ly56e1QCZ8EyfU7XC+OQL4FNr+ZzNlIE36uLpV Evvdg+DKKjBmsW6KhTlFkOOioB6+jS1GxmPKdNzzBs2Kw3EM0G7MIlmEGrSz7gzTv+f3aP D8CqHezEfRx/X11o2U17WQtYikRpa7dCOZTAnUUHvVSrGiUb7Ec2JQ0CbaTnf6dAvjIRsJ cMa/BUUi7zatzeOn8FFakgHEzqZTe/7Fd98SZ1oyXSP5RiiU+btglOP7LybhQg88RX4h3q AVCHw0uxJV0aGC6tSKjWncgsD+3CLRR3pkAwOnDIuk9RR5233FhpScAb8mfXwA== To: "IPFire: Location" <location@lists.ipfire.org> From: =?utf-8?q?Peter_M=C3=BCller?= <peter.mueller@ipfire.org> Subject: [PATCH] location-importer.in: Braindead me accidentally forgot a "break" statement Message-ID: <881acb1f-a618-bd5c-2a78-0d869122c30a@ipfire.org> Date: Sun, 8 Aug 2021 23:31:58 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: location@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <location.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/location>, <mailto:location-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/location/> List-Post: <mailto:location@lists.ipfire.org> List-Help: <mailto:location-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/location>, <mailto:location-request@lists.ipfire.org?subject=subscribe> Errors-To: location-bounces@lists.ipfire.org Sender: "Location" <location-bounces@lists.ipfire.org> |
Series |
location-importer.in: Braindead me accidentally forgot a "break" statement
|
|
Commit Message
Peter Müller
Aug. 8, 2021, 9:31 p.m. UTC
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>
---
src/python/location-importer.in | 1 +
1 file changed, 1 insertion(+)
Comments
Hello, Are you sure you don’t want this to be “continue”? > On 8 Aug 2021, at 23:31, Peter Müller <peter.mueller@ipfire.org> wrote: > > 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> > --- > src/python/location-importer.in | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/python/location-importer.in b/src/python/location-importer.in > index bec0b62..da058d3 100644 > --- a/src/python/location-importer.in > +++ b/src/python/location-importer.in > @@ -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) \ > -- > 2.26.2
Hello Michael, yes: All networks processed in this for-loop have the same country code set. If one of them is found to have an invalid country code set, all the others of this batch will do so as well - there is no need to check them individually. Thanks, and best regards, Peter Müller > Hello, > > Are you sure you don’t want this to be “continue”? > >> On 8 Aug 2021, at 23:31, Peter Müller <peter.mueller@ipfire.org> wrote: >> >> 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> >> --- >> src/python/location-importer.in | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/src/python/location-importer.in b/src/python/location-importer.in >> index bec0b62..da058d3 100644 >> --- a/src/python/location-importer.in >> +++ b/src/python/location-importer.in >> @@ -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) \ >> -- >> 2.26.2 >
Okay, merged. Thank you for the clarification. > On 9 Aug 2021, at 15:05, Peter Müller <peter.mueller@ipfire.org> wrote: > > Hello Michael, > > yes: All networks processed in this for-loop have the same country code set. > If one of them is found to have an invalid country code set, all the others of > this batch will do so as well - there is no need to check them individually. > > Thanks, and best regards, > Peter Müller > > >> Hello, >> >> Are you sure you don’t want this to be “continue”? >> >>> On 8 Aug 2021, at 23:31, Peter Müller <peter.mueller@ipfire.org> wrote: >>> >>> 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> >>> --- >>> src/python/location-importer.in | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/src/python/location-importer.in b/src/python/location-importer.in >>> index bec0b62..da058d3 100644 >>> --- a/src/python/location-importer.in >>> +++ b/src/python/location-importer.in >>> @@ -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) \ >>> -- >>> 2.26.2 >>
diff --git a/src/python/location-importer.in b/src/python/location-importer.in index bec0b62..da058d3 100644 --- a/src/python/location-importer.in +++ b/src/python/location-importer.in @@ -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) \