From baa2c210d942e07ed32e627a6e49db30cd85b86b Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 21 Jul 2020 11:44:55 +0800 Subject: [PATCH] check if supernet is really super --- .scripts/roa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scripts/roa.py b/.scripts/roa.py index e3a72fa..e6ff741 100755 --- a/.scripts/roa.py +++ b/.scripts/roa.py @@ -109,7 +109,7 @@ def route_to_roa(asn_table: dict): ) assert fields["name"] assert is_neo_network(fields["prefix"]) - assert not fields["supernet"] or is_neo_network(fields["supernet"]) + assert not fields["supernet"] or (is_neo_network(fields["supernet"]) and fields["supernet"].supernet_of(fields["prefix"])) yield pick(fields, ["asn", "name", "type", "prefix", "supernet"]) entities = sorted(make_route(), key=lambda item: item["asn"])