Skip to content

Commit 984d406

Browse files
authored
Fix: loopback pools might contain attributes that are not AFs (#2410)
Fixes #2405
1 parent c797a75 commit 984d406

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

netsim/augment/nodes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@ def augment_loopback_interface(n: Box, pools: Box, topology: Box) -> None:
227227
pool = n.get('loopback.pool','loopback')
228228
prefix_list = addressing.get(pools,[ pool ],n.id)
229229

230-
for af in prefix_list: # Merge pool-allocated loopback prefixes with static data
230+
for af in log.AF_LIST: # Merge pool-allocated loopback prefixes with static data
231+
if af not in prefix_list: # pool data has nothing about this AF
232+
continue
231233
if prefix_list[af] is False: # AF explicitely disabled in the pool
232234
continue # ... skip AF allocation
233235
if prefix_list[af] is True: # Pool specifies unnumbered/LLA address -- useless on loopbacks

0 commit comments

Comments
 (0)