From 2db3d05da3ac6b1ff9452a5f291bfc39a719d1c6 Mon Sep 17 00:00:00 2001 From: hasso Date: Wed, 11 Feb 2004 21:52:13 +0000 Subject: Don't crash when attempting to read path->oi->ifp if oi doesn't exist any more. I'm not sure if this read should be attempted at all, but I'm trying to keep code safe AND stable. --- ospfd/ospf_zebra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ospfd/ospf_zebra.c') diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index ea90c845..06916aee 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -429,7 +429,7 @@ ospf_zebra_delete (struct prefix_ipv4 *p, struct ospf_route *or) nexthop = &path->nexthop; api.nexthop = &nexthop; } - else if (path->oi->ifp) + else if (ospf_if_exists(path->oi) && (path->oi->ifp)) { SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP); api.ifindex_num = 1; -- cgit v1.2.3