Fix on bgpmap path calculation

This commit is contained in:
Florian Duraffourg 2015-11-25 14:23:09 +01:00
parent 3adf071c98
commit 9cb0073265

6
lg.py
View file

@ -588,7 +588,11 @@ def build_as_tree_from_raw_bird_ouput(host, proto, text):
net_dest = expr2.group(1).strip()
if line.startswith("BGP.as_path:"):
path.extend(line.replace("BGP.as_path:", "").strip().split(" "))
ASes = line.replace("BGP.as_path:", "").strip().split(" ")
if path:
path.extend(ASes)
else:
path = ASes
if path:
path.append(net_dest)