1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-12-25 13:09:23 +08:00

also check ptp nodes

This commit is contained in:
JerryXiao 2020-05-03 10:35:56 +08:00
parent cbc0f4ceea
commit cab73cde07
Signed by: Jerry
GPG key ID: 9D9CE43650FF2BAA
3 changed files with 6 additions and 3 deletions

View file

@ -1,4 +1,4 @@
TYPE="PTP" TYPE="PTP"
PROTO="WireGuard" PROTO="WireGuard"
UPSTREAM="MagicNeko-JP3" UPSTREAM="MagicNeko-JP03"
DOWNSTREAM="santost12" DOWNSTREAM="santost12"

View file

@ -1,4 +1,4 @@
TYPE="PTP" TYPE="PTP"
PROTO="WireGuard" PROTO="WireGuard"
UPSTREAM="Icecat-Explosion" UPSTREAM="MagicNeko-HK01"
DOWNSTREAM="SUNNET" DOWNSTREAM="SUNNET"

View file

@ -143,8 +143,11 @@ def neonet_route2roa(dirname, is_ipv6=False):
supernet = get_supernet(fc.get('supernet')) supernet = get_supernet(fc.get('supernet'))
netname = "%s-%s" % (fc.get('type'), route) netname = "%s-%s" % (fc.get('type'), route)
roa_entries.append(dict(zip(roa_entries_key, [asn, nettype(route, strict=True), supernet, netname]))) roa_entries.append(dict(zip(roa_entries_key, [asn, nettype(route, strict=True), supernet, netname])))
elif fc.get('type').lower() == 'ptp':
assert NODE_TABLE[fc.get('upstream')] # extra check for upstream
assert NODE_TABLE[fc.get('downstream')] # extra check for downstream
else: else:
assert fc.get('type').lower() in ('ptp',) raise AssertionError
except Exception: except Exception:
print("[!] Error while processing file", f) print("[!] Error while processing file", f)
raise raise