diff --git a/scripts/dns-reverse-generator.py b/scripts/dns-reverse-generator.py index 9b18e5b..d7aa65e 100755 --- a/scripts/dns-reverse-generator.py +++ b/scripts/dns-reverse-generator.py @@ -29,7 +29,7 @@ def main(): if isinstance(address, IPv4Address): pointer = address.reverse_pointer.replace(".127.10.in-addr.arpa", "") records.append("%s\tIN\tPTR\t%s.neo." % (pointer, name)) - RESOLVE_FILE.write_text("\n".join(records)) + RESOLVE_FILE.write_text("\n".join(records)+"\n") if __name__ == "__main__": diff --git a/scripts/roa.py b/scripts/roa.py index 2566941..c2b3876 100755 --- a/scripts/roa.py +++ b/scripts/roa.py @@ -122,7 +122,8 @@ def route_to_roa(asn_table: dict): ): if not net1["prefix"].overlaps(net2["prefix"]): continue - assert net1["prefix"] != net2["prefix"] + entity_from_net = lambda net: asn_table.get(net["asn"])["owner"] + assert net1["prefix"] != net2["prefix"] or (net1['asn'] != net2['asn'] and entity_from_net(net1) == entity_from_net(net2)) assert net1["prefix"].supernet_of(net2["prefix"]) s1net, s2net = (net1["supernet"], net2["supernet"]) assert s2net # please include supernet = in your route