Skip to content

Commit 68f7a3f

Browse files
committed
Fix: different linkindex values have to be used on phantom links
1 parent 7747e95 commit 68f7a3f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

netsim/extra/ebgp.multihop/plugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def pre_link_transform(topology: Box) -> None:
2121

2222
sessions = links.adjust_link_list(topology.bgp.multihop.sessions,topology.nodes,'bgp.multihop[{link_cnt}]')
2323
topology.bgp.multihop.sessions = sessions
24+
next_linkindex = links.get_next_linkindex(topology)
2425
for s in sessions:
2526
for attr in list(s.keys()): # Change session attributes into BGP link attributes
2627
# Skip internal attributes and BGP/VRF attributes already within BGP namespace
@@ -30,7 +31,8 @@ def pre_link_transform(topology: Box) -> None:
3031
s.pop(attr,None)
3132

3233
s.type = 'tunnel'
33-
s.linkindex = links.get_next_linkindex(topology)
34+
s.linkindex = next_linkindex
35+
next_linkindex += 1
3436
s._phantom_link = True
3537

3638
validate_attributes(

0 commit comments

Comments
 (0)