mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-01 05:13:01 +02:00
OSPF: skip interfaces without OSPF enabled
Fix a bug where systems with OSPF enabled on some, but not all,
interfaces would cause the OSPF iterator to fail when accessing
iface['area'], which was missing. This caused the ospf_status.py
tool to return {}, resulting in empty OSPF data in sysrepo.
Fixes #1169 Expected neighbors not shown in sysrepocfg
Signed-off-by: Richard Alpe <richard@bit42.se>
This commit is contained in:
@@ -40,6 +40,11 @@ def main():
|
||||
for ifname, iface in interfaces["interfaces"].items():
|
||||
iface["name"] = ifname
|
||||
iface["neighbors"] = []
|
||||
|
||||
# Skip interfaces that don't have OSPF enabled or area configured
|
||||
if not iface.get("ospfEnabled", False) or not iface.get("area"):
|
||||
continue
|
||||
|
||||
for area_id in ospf["areas"]:
|
||||
area_type=""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user