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

scripts/roa.py: extra check for downstream

This commit is contained in:
JerryXiao 2020-05-01 18:17:56 +08:00
parent 824ea7accc
commit 092dd8bfe1
Signed by: Jerry
GPG key ID: 9D9CE43650FF2BAA

View file

@ -75,8 +75,8 @@ def route2roa(dirname, is_ipv6=False):
route = f.name.replace(',', '/')
roa_entries.append([asn, nettype(route, strict=True)])
elif fc.get('type').startswith('tun'):
upstream = fc.get('upstream')
asn = NODE_TABLE[upstream]
assert NODE_TABLE[fc.get('downstream')] # extra check for downstream
asn = NODE_TABLE[fc.get('upstream')]
assert asn in ASNS
route = f.name.replace(',', '/')
roa_entries.append([asn, nettype(route, strict=True)])