summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ChangeLog5
-rw-r--r--ospfd/ospf_vty.c21
2 files changed, 17 insertions, 9 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index cb164590..b546bbd1 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-17 Hasso Tepper <hasso at quagga.net>
+
+ * ospf_vty.c: Check carefully if interface exists before trying to
+ print info about it.
+
2005-08-05 Hasso Tepper <hasso at quagga.net>
* ospf_zebra.c: Don't assert/stop before type == ZEBRA_ROUTE_MAX if
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 179464cc..0f2a0fce 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -6533,7 +6533,7 @@ show_ip_ospf_route_network (struct vty *vty, struct route_table *rt)
if (or->type == OSPF_DESTINATION_NETWORK)
for (ALL_LIST_ELEMENTS (or->paths, pnode, pnnode, path))
{
- if (path->oi != NULL)
+ if (path->oi != NULL && ospf_if_exists(path->oi))
{
if (path->nexthop.s_addr == 0)
vty_out (vty, "%24s directly attached to %s%s",
@@ -6583,13 +6583,16 @@ show_ip_ospf_route_router (struct vty *vty, struct route_table *rtrs)
for (ALL_LIST_ELEMENTS_RO (or->paths, pnode, path))
{
- if (path->nexthop.s_addr == 0)
- vty_out (vty, "%24s directly attached to %s%s",
- "", path->oi->ifp->name, VTY_NEWLINE);
- else
- vty_out (vty, "%24s via %s, %s%s", "",
- inet_ntoa (path->nexthop), path->oi->ifp->name,
- VTY_NEWLINE);
+ if (path->oi != NULL && ospf_if_exists(path->oi))
+ {
+ if (path->nexthop.s_addr == 0)
+ vty_out (vty, "%24s directly attached to %s%s",
+ "", path->oi->ifp->name, VTY_NEWLINE);
+ else
+ vty_out (vty, "%24s via %s, %s%s", "",
+ inet_ntoa (path->nexthop),
+ path->oi->ifp->name, VTY_NEWLINE);
+ }
}
}
}
@@ -6627,7 +6630,7 @@ show_ip_ospf_route_external (struct vty *vty, struct route_table *rt)
for (ALL_LIST_ELEMENTS (er->paths, pnode, pnnode, path))
{
- if (path->oi != NULL)
+ if (path->oi != NULL && ospf_if_exists(path->oi))
{
if (path->nexthop.s_addr == 0)
vty_out (vty, "%24s directly attached to %s%s",