ospfd: Change struct ospf_path *oi to ifindex.
* global: In struct ospf_path, change struct ospf_interface *oi to int
ifindex. It is unsafe to reference *oi as an ospf interface can be
deleted under your feet. Use a weak reference instead.
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 12afe5d..9566843 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -1077,13 +1077,14 @@
{
if (IS_DEBUG_OSPF_EVENT)
zlog_debug (" directly attached to %s\r\n",
- IF_NAME (path->oi));
+ ifindex2ifname (path->ifindex));
}
else
{
if (IS_DEBUG_OSPF_EVENT)
zlog_debug (" via %s, %s\r\n",
- inet_ntoa (path->nexthop), IF_NAME (path->oi));
+ inet_ntoa (path->nexthop),
+ ifindex2ifname (path->ifindex));
}
}
}