diff --git a/modules/visual_route.py b/modules/visual_route.py index cc9a2f3..025a5e7 100644 --- a/modules/visual_route.py +++ b/modules/visual_route.py @@ -21,7 +21,6 @@ ROUTER_NAME = os.getenv('BGP_VIS_ROUTER_NAME', 'My Router') def _bulk_get_as_names(asn_numbers: list[str]): lookup_list = [asn for asn in asn_numbers if asn not in AS_NAME_CACHE] if not lookup_list: return - print(f"Performing bulk lookup for {len(lookup_list)} AS numbers...") query = "begin\n" + "\n".join(f"AS{asn}" for asn in lookup_list) + "\nend\n" try: with socket.create_connection(('bgp.tools', 43), timeout=10) as s: @@ -67,10 +66,13 @@ def _parse_bgp_paths_to_graph(bgp_data: str) -> dict: for line in lines[paths_header_index + 1:]: stripped_line = line.strip() if not stripped_line: continue + is_new_path_line = False if line.startswith(' ') and not line.startswith(' '): first_word = stripped_line.split(' ')[0] - if first_word.isdigit() or stripped_line == "Local": + + cleaned_first_word = first_word.replace(',', '') + if cleaned_first_word.isdigit() or stripped_line == "Local": is_new_path_line = True if is_new_path_line: