1
0
Fork 0
mirror of https://github.com/sileht/bird-lg.git synced 2024-11-21 22:44:43 +01:00

Merge pull request #48 from alarig/master

Applying patch from @fduraffourg that fixes #9
This commit is contained in:
zorun 2019-06-07 01:25:27 +02:00 committed by GitHub
commit 85963901f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

6
lg.py
View file

@ -575,7 +575,11 @@ def build_as_tree_from_raw_bird_ouput(host, proto, text):
net_dest = expr2.group(1).strip() net_dest = expr2.group(1).strip()
if line.startswith("BGP.as_path:"): 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: if path:
path.append(net_dest) path.append(net_dest)