Prefix belongs to last node in as path, not first

This commit is contained in:
Sebastian Lohff 2020-06-13 19:51:12 +02:00
parent c81e632a72
commit e3c83bc83e
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ def _add_data_to_net(net, data):
if not as_path: if not as_path:
continue continue
orig_node = _populate_node(net, as_path[0]) orig_node = _populate_node(net, as_path[-1])
orig_node['prefixes'].add(route['prefix']) orig_node['prefixes'].add(route['prefix'])
for n in range(len(as_path) - 1): for n in range(len(as_path) - 1):