1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-11-23 07:20:40 +08:00

Merge remote-tracking branch 'upstream/master' into master

This commit is contained in:
Myer921 2020-07-21 16:34:18 +08:00
commit 2e14de4d74
No known key found for this signature in database
GPG key ID: 9E1B111EDB23F381
2 changed files with 3 additions and 1 deletions

View file

@ -8,6 +8,8 @@ set -x
export MAX_LEN_4=29 export MAX_LEN_4=29
export MAX_LEN_6=64 export MAX_LEN_6=64
mkdir -p generated
.scripts/roa.py -m "$MAX_LEN_4" -M "$MAX_LEN_6" -o generated/roa46_bird2.conf .scripts/roa.py -m "$MAX_LEN_4" -M "$MAX_LEN_6" -o generated/roa46_bird2.conf
.scripts/roa.py -m "$MAX_LEN_4" -M "$MAX_LEN_6" -4 -o generated/roa4_bird2.conf .scripts/roa.py -m "$MAX_LEN_4" -M "$MAX_LEN_6" -4 -o generated/roa4_bird2.conf
.scripts/roa.py -m "$MAX_LEN_4" -M "$MAX_LEN_6" -6 -o generated/roa6_bird2.conf .scripts/roa.py -m "$MAX_LEN_4" -M "$MAX_LEN_6" -6 -o generated/roa6_bird2.conf

View file

@ -109,7 +109,7 @@ def route_to_roa(asn_table: dict):
) )
assert fields["name"] assert fields["name"]
assert is_neo_network(fields["prefix"]) 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"]) yield pick(fields, ["asn", "name", "type", "prefix", "supernet"])
entities = sorted(make_route(), key=lambda item: item["asn"]) entities = sorted(make_route(), key=lambda item: item["asn"])